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 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

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.center calc()
.box.half width: 50%
.box.full-50vw width: calc(100vw - 50%)
.box.container
  span width: 50vw
  .box.w10em(style="margin-left: 0") width: 10em
  .box.intend-10em(style="margin-right: 0") width: calc( 100% - 10em )
  .clearfix
    span.left.w1em X
    span.right.w1em X
  .box.indentbox-2em
    | 1em indent box
    br
    | width: calc(100% - 2em)
.box.vmaxbox
  | width: calc((10vmax - 10vmin) * 2)
  br
  | height: calc(10vmax - 10vmin)
              
            
!

CSS

              
                *
  box-sizing: border-box

html, body
  margin: 0
body
  padding-bottom: 5em
  
.inline
  display: inline
.inline-block
  display: inline-block
  
.center
  text-align: center
.align-left
  text-align: left
.align-right
  text-align: right

.left
  float: left
.right
  float: right
  
.clearfix:after
  display: block
  clear: both
  content: ""

.box
  background: #ccc
  margin: 0 auto
  padding: .25em 
  text-align: center
  white-space: nowrap
  min-width: 1em
  min-height: 1em
.container
  padding: 0
  background: transparent
  border: 2px solid #e93d29
  width: 50vw
.half
  background: #f6cd4c
  width: 50%
.full-50vw
  background: #fa8ead
  width: calc( 100% - 50vw )
.w10em
  background: #fe7407
  width: 10em
.intend-10em
  background: #a0dbe3
  width: calc( 100% - 10em )
.indentbox-2em
  background: #6fb8a4
  width: calc( 100% - 2em )
.w1em
  text-align: center
  width: 1em
.vmaxbox
  background: #a4cad1
  width: calc((10vmax - 10vmin) * 2)
  height calc(10vmax - 10vmin)
              
            
!

JS

              
                
              
            
!
999px

Console