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

              
                <div class="ch-max">
  <p class="gray small">These items have a max width of 20ch</p>
  <p class="h3-style">Ipsum dolor sit amet consectetur adipiscing elit.</p>
  <p class="large">Pellentesque id nibh tortor id aliquet lectus proin nibh.</p>
  <p class="x-small">Pharetra diam sit amet nisl suscipit adipiscing bibendum est.
  </p>
</div>

<div class="rem-max">
  <p class="gray small">These items have a max width of 20rem</p>
  <p class="h3-style">Ipsum dolor sit amet consectetur adipiscing elit.</p>
  <p class="large">Pellentesque id nibh tortor id aliquet lectus proin nibh.</p>
  <p class="x-small">Pharetra diam sit amet nisl suscipit adipiscing bibendum est.
  </p>
</div>
              
            
!

CSS

              
                // All items inside this container will be limited to this ch size and vary based on the size of the font
.ch-max > * {
    max-width: 20ch;
}

// All items inside this container will be limited to this rem size, which is consistent
.rem-max > * {
    max-width: 20rem;
}

//
//
//
// Just some styles to help distinguish the containers
div {
  padding: 0.5rem 1rem;
  border: 2px dotted black;
  margin: 1rem;
}

.gray {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.25);
  padding-bottom: 0.5rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console