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

              
                <p>
  <span class="dashed">Dashed example</span>
</p>

<p>
  <span class="dotted">Dotted example</span>
</p>

<p>
  <span class="double">Double example</span>
</p>
              
            
!

CSS

              
                a {
  color: #000;
  text-decoration: none;
}

.dashed {
  background-image: linear-gradient(to right, blue 75%, transparent 75%);
  background-position: 0 1.04em;
  background-repeat: repeat-x;
  background-size: 8px 3px;
}

.dotted {
  background-image: linear-gradient(to right, #d534e9 50%, transparent 50%);
  background-position: 0 1.04em;
  background-repeat: repeat-x;
  background-size: 6px 3px;
}

.double {
  background-image: linear-gradient(to bottom, red 33%, transparent 33%, transparent 66%, red 66%, red);
  background-position: 0 1.03em;
  background-repeat: repeat-x;
  background-size: 2px 6px;
}

// ----- Unrelated ----- //

html {
  $square-color: #eee;
  $square-size: 8px;
    background-image:
    linear-gradient(45deg, $square-color 25%, transparent 25%, transparent 75%, $square-color 75%, $square-color), 
    linear-gradient(45deg, $square-color 25%, transparent 25%, transparent 75%, $square-color 75%, $square-color);
  background-position: 0 0, $square-size $square-size;
  background-size: ($square-size * 2) ($square-size * 2);
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 48px;
  line-height: 1;
  padding: 20px;
}

body {
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

p {
  margin: 0;
  margin-bottom: 25px;
  
  &:last-child {
    margin-bottom: 0;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console