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. 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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


  <li><h1>The new way to <code>{ background }</code></h1></li>
  <li id="bg-shorthand"></li>
  <li id="bg-longhand"></li>


                @import "compass/css3";

// Global Demo Styling
// ==================================================================

html {
  background: maroon;

ul {
  list-style-type: none;
  height: 840px;
  width: 840px;
  margin: 3em auto;

li[id*="bg-"] {
  display: inline-block;
  border: 1px solid red;
  height: 400px;
  width: 400px;

h1 {
  font-family: Cambria, serif;
  text-transform: uppercase;
  color: #EFEFEF;
  code {
    text-transform: lowercase;
    color: #cbad45;

// The meat and taters of this demo
// ==================================================================
// not only can we include a background-size value in our shorthand
// but we can also declare its position based on offset values.

#bg-shorthand {
  background: url(// right 20px bottom 0% / 176px 31px no-repeat; // background-size property must come last i.e. 176 and 31

#bg-longhand {
  background-image: url(//;
  background-repeat: no-repeat;  
  background-position: left 20px top 20px; // now offset from the containing element
  background-size: 176px 31px;


                // Browsers Passing as of 4/9/14:
// Chrome 33.0.1750.152, Firefox 28, Opera 20, Safari 7.0.3

// Browsers Failing:
// Safari 6.0.2, Chrome 24.0.1312.57

// References