Pen Settings



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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


                <!-- :scope -->
<div class="example-cntr scope">
    <h1>CSS <code>:scope</code> pseudo-class</h1>    
    <p>The <code>:scope</code> pseudo-class makes more sense when it’s tied to the <code>scoped</code> HTML attribute in a <code>&lt;style></code> tag. If there is no <code>scoped</code> attribute in a <code>&lt;style></code> tag within a section of the page, then the <code>:scope</code> pseudo-class will scope all the way out to the <code>&lt;html></code>, which is the default scope of a style sheet.</p>
    <p><em>Note: Firefox is the only one that supports this pseudo-class. That’s why we see this text in italics in all other browsers.</em></p>
    <p>In the following example, this HTML block has a <code>scoped</code> style sheet in the markup. All text inside the second <code>&lt;section></code> will be in italics:</p>
            <h1>Section 1 Heading</h1>
            <p>Lorem ipsum dolor sit amet.</p>
            <style scoped>
                    font-style: italic;
            <h1>Section 2 Heading</h1>
            <p>This text will be italicized.</p>



.scope {
    article {
        padding: 40px;
        font: 22px Garamond;
        color: lighten($g,30);
    h1 { text-align: left; }
    em { text-decoration: underline; }

//Styling stuff not needed for demo
body { text-align: left; }
h1 {
    font-size: 22px;
    text-transform: none;
    border-bottom: #636363 1px dotted;
    code {
        display: inline-block;
        margin-bottom: 10px;
        color: $y;
        background: none;
        box-shadow: none;
code { font-size: 1em; }
.example-cntr {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 30px;
    box-shadow: 0 1px 2px rgba(black,.3);
    background: rgba(black,.15);
    & > h1 { text-align: center; }