Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <article class="related-article">
        <time class="date">13 Jun, 2018</time>
        <h3 class="stripe_headline"><a href="/blog/2018/06/13/how-to-use-css-grid-to-mix-and-match-design-patterns/">How To: Use CSS Grid to Mix and Match Design Patterns</a></h3>
        <div class="stripe_description">
            <p>In a previous tutorial, I described how to create a simple fluid card grid with CSS Grid. In this tutorial, we'll take it a step farther and create promotional spaces that morph in interesting ways.</p>
            <a href="/blog/2018/06/13/how-to-use-css-grid-to-mix-and-match-design-patterns/" title="How To: Use CSS Grid to Mix and Match Design Patterns">Read More »</a>
        </div>
    </article>
              
            
!

CSS

              
                .related-article {  
    padding: 20px;
    position: relative;
    background-image: linear-gradient(120deg,#eaee44,#33d0ff);
}
.related-article * {
    position: relative; // Set stacking context to keep content on top of the background
}
.related-article::before {
    content: "";
    background-color: #fff;
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
}





// STYLING THAT DOESNT AFFECT THE CODE

.related-article {
    max-width: 800px;
    margin: 50px auto;
    //sizing and centering
}

* {
    box-sizing: border-box;
}
body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.5em;
}
a {
    color: tomato;
    text-decoration: none;
}
              
            
!

JS

              
                
              
            
!
999px

Console