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

              
                .device
  .window
    header.header
      h1.brand Scrollable nav
    nav.navigation
      a.navigation__item(href='#') Home
      a.navigation__item(href='#') About
      a.navigation__item(href='#') Work
      a.navigation__item(href='#') Contact
              
            
!

CSS

              
                $color--white = #FFFFFF
$color--black = #000000
$color--light-grey = #E6E6E6
$color--grey = #CCCCCC
$color--dark-grey = #7B7B7B

$color--primary = #4CAF50
$color--secondary = #388E3C

*
  box-sizing border-box

html, body
  height 100%

body
  display flex
  align-items center
  justify-content center
  height 100%
  background $color--primary
  font-family 'Source Sans Pro', sans-serif
  
.device
  padding-top 35px
  background #2E7D32
  border-radius 15px
  margin 20px
  
.window
  position relative
  height 450px
  min-width 300px
  width 100%
  max-width 600px
  background $color--light-grey
  -webkit-overflow-scrolling touch

.header
  display flex
  justify-content center
  align-items center
  height 100px
  background $color--secondary
  
.brand
  margin 0
  font-family 'Alegreya Sans', sans-serif
  font-size 40px
  font-weight 700
  color $color--white

.navigation
  display flex
  justify-content space-between
  align-items center
  width 100%
  list-style none
  padding 0
  margin 0
  overflow-x auto
  background $color--white
  border-bottom 2px solid $color--grey

.navigation__item
  padding 20px 30px
  color $color--dark-grey
  text-transform uppercase
  text-decoration none
  font-weight 700

  &:hover
    color $color--secondary
  
              
            
!

JS

              
                $('.window').resizable({
  handles: 'e'
})
              
            
!
999px

Console