Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                .cntr
  input#cbx.hidden-xs-up type="checkbox"/
  label.cbx for="cbx" 
  label.lbl for="cbx" Make Magic
              
            
!

CSS

              
                .cbx
  position relative
  top 1px
  width 17px
  height 17px
  border 1px solid #C8CCD4
  border-radius 3px
  vertical-align middle
  transition background .1s ease
  cursor pointer
  &:after
    content ''
    position absolute
    top 1px
    left 5px
    width 5px
    height 11px
    opacity 0
    transform rotate(45deg) scale(0)
    border-right 2px solid white
    border-bottom 2px solid white
    transition all .3s ease
    transition-delay .15s 

.lbl
  margin-left 5px
  vertical-align middle
  cursor pointer
  
#cbx:checked ~ .cbx
  border-color transparent
  background #6871F1
  animation jelly .6s ease
  &:after
    opacity 1
    transform rotate(45deg) scale(1)
   
@keyframes jelly
  from
    transform scale(1, 1)
  30%
    transform scale(1.25, 0.75)
  40%
    transform scale(0.75, 1.25)
  50%
    transform scale(1.15, 0.85)
  65%
    transform scale(.95, 1.05)
  75%
    transform scale(1.05, .95)
  to
    transform scale(1, 1)

.cntr
  position absolute
  top 50%
  left 0
  width 100%
  text-align center
              
            
!

JS

              
                
              
            
!
999px

Console