Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- See CSS for explanation. -->

<div class="control">Test</div>
<div class="control large">Test</div>
<div class="control ie-large">Test</div>
<div class="control control-large">Test</div>
              
            
!

CSS

              
                // Seems there's a bug in Internet Explorer 9 wherein pseudo content (:before and :after content) doesn't get parsed properly in the DOM, so instead of declarations like font-size being applied only once despite multiple occurrences of the rule, but is in fact treated like a child element in each instance.

.control:before {
  content: "before: ";
}

// This is a normal declaration for our control.
.large:before {
  font-size: 1.33em;
}

// These three rules are all valid, but the way in which IE9 interprets them is incorrect--the font-size is applied three times on top of one another, making the fully-parsed font-size of our .ie-large class:
// 1.33em * 1.33em * 1.33em = 2.352637em
.ie-large:before {
  font-size: 1.33em;
}
.ie-large:before {
  font-size: 1.33em;
}
.ie-large:before {
  font-size: 1.33em;
}

// This is to demonstrate the multiplication in IE9.
.control-large:before {
  font-size: 2.352637em;
}

// This has been documented on StackOverflow:
// http://stackoverflow.com/questions/6322916/ie9-bug-with-increased-font-size-of-css-content
              
            
!

JS

              
                
              
            
!
999px

Console