Pen Settings



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


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


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.


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.


                button Boo!


  box-sizing border-box
  --bg #fafafa
  display flex
  align-items center
  justify-content center
  min-height 100vh
  background var(--bg)
  color var(--bg)
  --borderWidth 5
  --boxShadowDepth 8
  --buttonColor red
  --fontSize 3
  --horizontalPadding 16
  --verticalPadding 8
  background transparent
  border calc(var(--borderWidth) * 1px) solid var(--buttonColor)
  box-shadow calc(var(--boxShadowDepth) * 1px) calc(var(--boxShadowDepth) * 1px) 0 #888
  color var(--buttonColor)
  cursor pointer
  font-size calc(var(--fontSize) * 1rem)
  font-weight bold
  outline transparent
  padding calc(var(--verticalPadding) * 1px) calc(var(--horizontalPadding) * 1px)
  position relative
  transition box-shadow .15s ease

    box-shadow calc(var(--boxShadowDepth) / 2 * 1px) calc(var(--boxShadowDepth) / 2 * 1px) 0 #888
    box-shadow 0 0 0 #888
    -webkit-clip-path var(--clip)
    background var(--bg)
    bottom calc(var(--borderWidth) * -1px)
    clip-path var(--clip)
    left calc(var(--borderWidth) * -1px)
    opacity 0.5
    position absolute
    right calc(var(--borderWidth) * -1px)
    top calc(var(--borderWidth) * -1px)
    z-index 1

      --clip polygon(0 0, 100% 0, 100% 100%, 0 100%)
      opacity 1
      z-index 2
      --bg blue
      --clip polygon(0 0, 100% 0, 50% 50%, 50% 50%)
      --bg red
      --clip polygon(100% 0, 100% 100%, 50% 50%)
      --bg green
      --clip polygon(0 100%, 100% 100%, 50% 50%)
       --bg purple
      --clip polygon(0 0, 0 100%, 50% 50%)