cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              nav.nav-main
  label
    i(class="fa fa-bars pointer")
    input(type="checkbox")
    ul
      li
        a
          i(class="fa fa-times pointer")
      li
        a(href="#") Home
      li
        a(href="#") Long Title
      li
        a(href="#") Products
      li
        a(href="#") Services
      li
        a(href="#") Contact Us
      li
        a(href="#") Get Lost
      li
        a(href="#") Another Item
      li
        a(href="#") Fancy Pants
header
section
  .centered
    i(class="fa fa-bars")
    h1 Pure CSS Menu Drawer
    p Having some fun with the&nbsp;&nbsp;<span class="code">:checked</span>&nbsp;&nbsp;and &nbsp;&nbsp;<span class="code">+</span>&nbsp;&nbsp; pseudo selectors.
footer
            
          
!
            
              $color-primary: #1B1A1A
$color-secondary: #B52B2B
$color-secondary-2: #942A2A
$color-tertiary: #FFF

body
  margin: 0
  padding: 0
  height: 100%
  background: $color-primary
  color: #fff
  font-family: "Helvetica Neue", Helvetica, sans-serif
  
.nav-main
  display: inline-block
  label
    display: block
    height: 2em
    width: 2em
    text-indent: -9999px
    > i
      display: block
      text-indent: 0px
      padding: 1em
  input
    display: none
    &:checked + ul
      transform: translateX(0%)
      box-shadow: 0 0 30px rgba(0,0,0,0.5)
      > li
        opacity: 1
        transform: translateX(0%)
        &:nth-child(1)
          transition-delay: .1s
          i
            transform: translateX(0%) rotate(360deg)
        &:nth-child(2)
          transition-delay: .1s
        &:nth-child(3)
          transition-delay: .15s
        &:nth-child(4)
          transition-delay: .2s
        &:nth-child(5)
          transition-delay: .25s
        &:nth-child(6)
          transition-delay: .3s
        &:nth-child(7)
          transition-delay: .35s
        &:nth-child(8)
          transition-delay: .4s
        &:nth-child(9)
          transition-delay: .45s
  ul
    position: fixed
    top: 0
    margin: 0
    height: 100vh
    width: 15em
    padding: 0
    list-style: none
    transform: translateX(-100%)
    transition: all .2s ease
    background: $color-secondary
    text-indent: 0
    box-shadow: 0 0 30px rgba(0,0,0,0.0)
    > li
      opacity: 0
      transform: translateX(-100%)
      transition: all .3s ease .05s
      &:nth-child(1)
        a
          padding: 0
          i
            transform: translateX(0%) rotate(0deg)
            transition: all .5s ease
        a:hover 
          background: $color-secondary
      > a
        display: block
        position: relative
        padding: 1em 1em
        color: $color-tertiary
        font-weight: 900
        text-decoration: none
        transition: all .1s ease
        &:hover 
          background: $color-secondary-2
  
.centered
  position: absolute
  top: 50%
  left: 50%
  transform: translate(-50%,-50%)
  text-align: center
  h1
    margin: 0.67em 0 0 0
  i.fa
    display: block
    margin: 0 auto
    padding: 1em
    height: 1em
    width: 1em
    border-radius: 50%
    background: $color-secondary
    line-height: em
    text-align: center
    font-size: 3em
    color: rgba(255,255,255,1)
    &:hover
      background: $color-secondary-2
      color: rgba(255,255,255,1)
  p
    line-height: 1.5em

.pointer
  cursor: pointer
  padding: 1em
  height: 1em
  width: 1em

.code
  background: $color-secondary-2
  padding: .15em .5em
  border-radius: .25em

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console