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

              
                <button>
  Let’s Go!
</button>













<footer class="error-message"><small>This is a demo of <code>background-clip: border-area</code>. Your browser does not <a href="https://caniuse.com/mdn-css_properties_background-clip_border-area" target="_blank">have support</a>. Try it in <a href="https://developer.apple.com/safari/resources/" target="_blank">Safari Technology Preview or Safari 18.2 beta</a>.</small></footer>
              
            
!

CSS

              
                @supports (background-clip: border-area) {
  button {
    color: transparent;
    border: calc(1vw + 5px) solid transparent;
    border-radius: 1.2lh;
    background-image: 
      linear-gradient(to bottom right in hsl, 
                      green, purple), 
      linear-gradient(to bottom right in hsl, 
                      green, purple);
    background-origin: border-box;
    background-clip: border-area, 
                     text;
  }
}
@supports not (background-clip: border-area) {
  button {
    color: transparent;
    border: calc(1vw + 5px) solid #00257f;
    border-radius: 1.2lh;
    background-image: 
      linear-gradient(to bottom right in hsl, 
                      green, purple);
    background-origin: border-box;
    background-clip: text;
  }
}

@layer reset-and-setup, box-styles;

@layer box-styles {
  button {
    padding: 0.5lh;
    font-family: Montserrat, sans-serif;
    font-size: calc(5vw + 1.4rem);
    font-weight: 980;
    text-align: center;
    background: none;
  }
}

@layer reset-and-setup { 
  * { 
    box-sizing: border-box; 
  }
  :root { 
/*     color-scheme: light dark; */
  }
  body {
    background: thistle;
    margin: 0;
    height: 100vh;
    display: grid;
    place-content: center;
  }
}







.error-message { display: none; }
@supports not (background-clip: border-area) {
  .error-message {
    color: white;
    padding: 2rem;
    background: darkred;
    display: block;
    width: 100%;
    text-align: center;
    font-size: 1.3rem;
    font-family: ui-system, sans-serif;
    a {
      color: #f1f170;
    }
    position: fixed;
    top: 0;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console