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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                input#morning.inp-cbx(type='checkbox')
label.cbx(for='morning')
  span
    svg(width='12px',height='10px')
      use(xlink:href='#check')
  span Morning
input#noon.inp-cbx(type='checkbox')
label.cbx(for='noon')
  span
    svg(width='12px',height='10px')
      use(xlink:href='#check')
  span Noon
input#afternoon.inp-cbx(type='checkbox')
label.cbx(for='afternoon')
  span
    svg(width='12px',height='10px')
      use(xlink:href='#check')
  span Afternoon
input#evening.inp-cbx(type='checkbox', style='display: none')
label.cbx(for='evening')
  span
    svg(width='12px',height='10px')
      use(xlink:href='#check')
  span Evening
  
//SVG Sprites
svg.inline-svg
  symbol#check(viewbox='0 0 12 10')
    polyline(points='1.5 6 4.5 9 10.5 1')


              
            
!

CSS

              
                $primary = #0077FF

*
  box-sizing: border-box

.cbx
  -webkit-user-select: none
  user-select: none
  cursor: pointer
  padding: 6px 8px
  border-radius: 6px
  overflow: hidden
  transition: all .2s ease
  &:not(:last-child)
    margin-right: 6px
  &:hover
    background: rgba($primary,.06)
  span
    float: left
    vertical-align: middle
    transform: translate3d(0,0,0)
    &:first-child
      position: relative
      width: 18px
      height: 18px
      border-radius: 4px
      transform: scale(1)
      border: 1px solid #CCCFDB
      transition: all .2s ease
      box-shadow: 0 1px 1px rgba(#00104B,.05)
      svg
        position: absolute
        top: 3px
        left: 2px
        fill: none
        stroke: #FFFFFF
        stroke-width: 2
        stroke-linecap: round
        stroke-linejoin: round
        stroke-dasharray: 16px
        stroke-dashoffset: 16px
        transition: all .3s ease
        transition-delay: .1s
        transform: translate3d(0,0,0)
    &:last-child
      padding-left: 8px
      line-height: 18px
  &:hover span:first-child
    border-color: $primary
    
.inp-cbx
  position: absolute
  visibility: hidden
 
.inp-cbx:checked + .cbx
  span
    &:first-child
      background: $primary
      border-color: $primary
      animation: wave .4s ease
      svg
        stroke-dashoffset: 0   
    
@keyframes wave
  50%
    transform: scale(.9)

body
  font-family: "Open Sans", sans-serif
  font-size: 16px
  -webkit-font-smoothing: antialiased
  text-rendering: optimizelegibility
  color: #223254
  min-height: 100vh
  display: flex
  justify-content: center
  align-items: center
  
.inline-svg
  position: absolute
  width: 0
  height: 0
  pointer-events: none
  user-select: none
  
@media screen and (max-width: 640px)
  body
    width: auto
    display: inherit
    padding: 20px
  .cbx
    width: 100%
    margin-bottom: 4px
    display: inline-block
              
            
!

JS

              
                
              
            
!
999px

Console