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.


  h1 Which will you choose?
    input type="radio" name="flat" id="rock"
    label for="rock" Rock
    input type="radio" name="flat" id="paper"
    label for="paper" Paper
    input type="radio" name="flat" id="scissors"
    label for="scissors" Scissors


                @import compass

$colors: #2980b9 #8e44ad #7f8c8d #c0392b #16a085 #f39c12

$h1height: 108px
$buttonsize: 230px
$pressdepth: 12px
$bg: nth($colors, random(length($colors)) + 1)
// Override the random color for now
$bg: #c0392b

=shadowfy($num, $c)
  $shadow: 1px 1px #{$c}
  @for $i from 2px through $num*1px
    $shadow: append($shadow, $i ($i) $c, comma)
  box-shadow: $shadow

  box-sizing: border-box

html, body
  height: 100%

  margin: 0
  padding: 0
  background: $bg

  height: $h1height
  font: bold 36px/#{$h1height} sans-serif
  text-transform: uppercase
  color: scale-lightness($bg, -35%)
  $vcentheight: $h1height * 2 + $buttonsize / 2
  $vcentwidth: $buttonsize * 3 + 2 * $buttonsize * 2/5
  position: absolute
  top: 50%
  left: 50%
  height: $vcentheight
  width: $vcentwidth
  margin: -$vcentheight/2 0 0 #{-$vcentwidth/2}
  text-align: center
  position: absolute
  left: -99999px
  cursor: pointer
  position: absolute
  height: $buttonsize / 2
  width: $buttonsize + $pressdepth
  border-left: $pressdepth solid scale-lightness($bg, 20%)
  border-right: 0 solid $bg
  font: bold 24px / #{$buttonsize / 2} sans-serif
  text-align: center
  text-transform: uppercase
  color: scale-lightness($bg, -25%)
  background: scale-lightness($bg, 10%)
  @for $i from 0 through 2
    &:nth-child(#{2 * ($i + 1)})
      left: $i * $buttonsize*7/5
  +transition(background 2s, width .5s .5s, border-left .5s .5s, border-right .5s, box-shadow 0 .5s)
  +shadowfy(800, scale-lightness($bg, -5%))
  \input:checked + &
    width: $buttonsize - $pressdepth
    border-left-width: 0
    border-left-color: $bg
    border-right-width: $pressdepth
    border-right-color: scale-lightness($bg, 10%)
    color: scale-lightness($bg, -45%)
    background: scale-lightness($bg, -10%)
    +transition(color 2s, background 2s, width .5s, border-left .5s, border-right .5s .5s, box-shadow 0 .5s)
      background: scale-lightness(#27ae60, 35%)
      border-right-width: 34px
      border-bottom-width: 34px
      border-bottom-color: scale-lightness($bg, -25%)
      +transition(border .5s .5s)
    content: ''
    position: absolute
    top: 12px
    right: 12px
    height: 12px
    width: 12px
    background: scale-lightness($bg, -15%)
    +transition(background .5s)
    content: ''
    position: absolute
    bottom: 0px
    left: 0px
    height: 0
    width: 0
    border-bottom: 10px solid transparent
    border-right: 10px solid transparent
    +transition(border .5s)
    display: none