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

              
                
h1 Flat UI Checkboxes
div
   input(type="checkbox").switch#notify
   label(for="notify") Notifications

   input(type="checkbox").symbol#tnc
   label(for="tnc") Terms & Conditions

   input(type="checkbox").box#age
   label(for="age") Show Age

   input(type="checkbox").box.radio#name
   label(for="name") Show Name
              
            
!

CSS

              
                
html
   height: 100%
body
   background: #111422
   color: #ddd
   height: 90%
   display: flex
   justify-content: center
   align-items: center
   flex-direction: column
   font:
      size: 16px
      family: Arial, sans-serif
h1
   font:
      size: 3rem
      weight: bold
   margin-bottom: 1rem
   
   
label
   margin: 50px
   cursor: pointer
   
.switch
   display: none
.switch + label
   position: relative
   display: inline-block
   padding-right: 60px
   
   &:before,
   &:after
      content: ''
      display: block
      position: absolute
      top: 50%
      transition: background 200ms ease-in-out
   &:after
      right: 20px
      margin-top: -15px
      width: 30px
      height: 30px
      border-radius: 50%
      background: #ddd
      transition: right 200ms ease-in-out
   &:before
      right: 5px
      margin-top: -10px
      width: 40px
      height: 20px
      border-radius: 25px
      background: #b53
   
.switch:checked + label
   &:after
      right: 0
      
   &:before
      background: #9b3
   
   
.symbol
   display: none
.symbol + label
   position: relative
   padding-right: 50px
   
   &:before, 
   &:after
      content: ''
      position: absolute
      display: inline-block
      background: #b53
      border-radius: 10px
      transition: transform 200ms ease-in-out, background 200ms ease-in-out, top 200ms ease-in-out, right 200ms ease-in-out
   &:before 
      width: 15px
      height: 35px
      top: -5px
      right: 10px
      transform: rotate(-135deg)
   
   &:after
      width: 35px
      height: 15px
      top: 5px
      right: 0
      transform: rotate(-135deg)
   
.symbol:checked + label
   
   &:before 
      width: 15px
      height: 25px
      top: 5px
      right: 20px
      transform: rotate(135deg)
      background: #9b3
   
   &:after
      width: 35px
      height: 15px
      top: 6px
      right: -2px
      transform: rotate(135deg)
      background: #9b3
   
.box
   display: none
.box + label
   position: relative
   display: inline-block
   padding-right: 50px
   
   &:after
      display: block
      content: ''
      width: 30px
      height: 30px
      background: #b53
      position: absolute
      top: -5px
      right: 0
      border: 15px solid #ddd
      box-sizing: border-box
      transition: border 200ms ease-in-out, background 400ms ease-in-out
   
.box:checked + label
   &:after
      border: 5px solid #ddd
      background: #9b3
      
.radio + label
   &:after
      border-radius: 50%
              
            
!

JS

              
                
              
            
!
999px

Console