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

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

              
                <p><strong>Click the buttons with a pointing device and focus them with the keyboard using the tab key.</strong></p>
<p>This is the default behavior in browsers without support for <code>:focus-visible</code>. The focus styles appear also on mouse click:</p>
<button>Without :focus-visible</button>
<p>In browsers with support for <code>:focus-visible</code>, focus styles will only be visible on keyboard focus – without the need for a polyfill! Other browsers still show the default <code>:focus</code> styles. Progressive enhancement at work. ;)</p>
<button class="with-focus-visible">With :focus-visible</button>
              
            
!

CSS

              
                *, *::before, *::after {
  box-sizing:border-box;
}

body {
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: #e6e8ea;
  margin: 0;
  padding: 1rem;
}

button {
  display: block;
  margin: 0 0 1rem;
  color: #fff;
  background-color: #303753;
  border: none;
  font-size: 1.25rem;
  padding: 1rem 1.5rem;
  border-radius: 0.25em;
  transition: background-color 0.14s ease;
  cursor: pointer; // …or not? ;)
}

button:active {
  transform: translateY(1px);
}

button:focus {
  box-shadow: 0 0 0 3px #dc143f;
  outline: 0;
}

button:hover {
  background-color: #223b9c;
}

button.with-focus-visible:focus:not(:focus-visible) {
  box-shadow: none;
  outline: 0;
}

button.with-focus-visible:focus-visible, button.with-focus-visible:moz-focusring {
  box-shadow: 0 0 0 3px #dc143f;
  outline: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console