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

              
                <nav>
  <input type="checkbox" id="nav" class="hidden"/>
  <label for="nav" class="nav-open"><i></i><i></i><i></i></label>
  <div class="nav-container">
    <ul>
      <li><a href="#">Work</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Careers</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
  </div>
</nav>
              
            
!

CSS

              
                $color = #1F2227

body
  font-family 'Helvetica Neue', sans-serif
  font-weight 400

*
  box-sizing border-box

nav
  padding 30px
  ul
    float right
    li
      display inline-block
      float left
      &:not(:first-child)
        margin-left 25px
      a
        display inline-block
        outline none
        color $color
        font-size 16px
        text-decoration none
        letter-spacing .04em
        &:hover
          color gray
          text-decoration none
        
@media screen and (max-width: 560px) 
	.nav-container 
    position fixed
    top 0
    left 0
    height 100%
    width 100%
    z-index -1
    background $color
    opacity 0
    transition all .2s ease
    ul
      position absolute
      top 50%
      transform translateY(-50%)
      width 100%
      li
        display block
        float none
        width 100%
        text-align right
        margin-bottom 10px
        &:nth-child(1) a
          transition-delay .2s
        &:nth-child(2) a
          transition-delay .3s
        &:nth-child(3) a
          transition-delay .4s
        &:nth-child(4) a
          transition-delay .5s
        &:not(:first-child)
          margin-left 0
        a
          padding 10px 25px
          opacity 0
          color white
          font-size 24px
          font-weight 600
          transform translateY(-20px)
          transition all .2s ease
          
          
   .nav-open
      position fixed
      right 10px
      top 10px
      display block
      width 48px
      height 48px
      cursor pointer
      z-index 9999
      border-radius 50%
      i
        display block
        width 20px
        height 2px
        background $color
        border-radius 2px  
        margin-left 14px
      i:nth-child(1)
        margin-top 16px
      i:nth-child(2)
        margin-top 4px
        opacity 1
      i:nth-child(3)
        margin-top 4px
        

  
#nav:checked + .nav-open
  transform rotate(45deg)
  i
    background white
    transition transform .2s ease
    &:nth-child(1)
      transform translateY(6px) rotate(180deg)
    &:nth-child(2)
      opacity 0
    &:nth-child(3)
      transform translateY(-6px) rotate(90deg)

#nav:checked ~ .nav-container
  z-index 9990
  opacity 1
  ul li
    a
      opacity 1
      transform translateY(0)
    
.hidden
  display none
              
            
!

JS

              
                //No JS
              
            
!
999px

Console