Pen Settings



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


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.


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.


                - var colors = [
-  'red',
-  'orange',
-  'yellow',
-  'green',
-  'blue',
-  'indigo',
-  'violet'
- ]

h1 Color Picker
p HTML/CSS-only color picker concept.
  each color in colors
    - var pickerId = "hat-color"
    input(type='radio' name=pickerId value=color class=color id=pickerId + "-" + color)
    label(for=pickerId + "-" + color, class=color)= color


                red    = #ff3e05
orange = #ff8d05
yellow = #ecca05
green  = #40af04
blue   = #057fff
indigo = #7500ca
violet = #cc6fcc

  box-sizing border-box

  display table
  width 100%
  height 100%

  text-align center
  display table-cell
  vertical-align middle
  padding 1em
  background whitesmoke
  font 100%/1.2 "Helvetica Neue"
  font-weight 200

  margin-top 1em
  font-size 0.875em
  text-align center
  display inline-table
  width 100%
  max-width 40em
  background white
  padding 2px
  border-radius 0.35em
  box-shadow 0 0.5em 1.5em rgba(black, 0.15)

    -webkit-tap-highlight-color rgba(white, 0.5)
    transition all 0.2s ease-in-out
    display table-cell
    cursor pointer
    vertical-align middle
    padding 0.5em 1em
    text-transform capitalize
    letter-spacing -0.5em
    color transparent
    opacity 0.35
    width 1%
    background-image linear-gradient(rgba(white, 0.1), rgba(black, 0.1))
      background-color red
      -webkit-tap-highlight-color red
      background-color orange
      -webkit-tap-highlight-color orange
      background-color yellow
      -webkit-tap-highlight-color yellow
      background-color green
      -webkit-tap-highlight-color green
      background-color blue
      -webkit-tap-highlight-color blue
      background-color indigo
      -webkit-tap-highlight-color indigo
      background-color violet
      -webkit-tap-highlight-color violet
      border-radius 0.25em 0 0 0.25em
      border-radius 0 0.25em 0.25em 0
      opacity 1
      color white
      letter-spacing normal
    display none
      & + label
        width 90%
        opacity 1
        color white
        letter-spacing normal