css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              nav.navigation
  input#menu(type="checkbox", name="menu")
  label.menu-link(for="menu") Menu
  ul.mainNav
    li 
      a(href="#") Lorem
    li 
      a(href="#") ipsum
    li 
      a(href="#") dolor
    li 
      a(href="#") sit
    li
      a(href="#") amet
.main
  header.mainHeader
    h1.title  Lorem ipsum dolor sit amet
    
  .content
    h2 Lorem ipsum dolor sit.
    p  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima, dolorem ut excepturi distinctio consequatur ipsa explicabo eum rerum saepe fugit!
    
  aside.sidebar
    p  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, odio!
    p  Lorem ipsum dolor sit amet.
    p  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto asperiores voluptate nihil, ab adipisci voluptatum.
  
            
          
!
            
              // Imports
@import url(https://fonts.googleapis.com/css?family=Economica:700)

//Variables
$primaryColor: #789
$transitionTime: .2s
$menuFold: 1270px

// Mixins
=transition ($properties...) 
  transition-property: $properties
  transition-duration: $transitionTime
  transition-timing-function: ease-in-out
  -webkit-transition-property: $properties
  -webkit-transition-duration: $transitionTime
  -webkit-transition-timing-function: ease-in-out
  -moz-transition-property: $properties
  -moz-transition-duration: $transitionTime
  -moz-transition-timing-function: ease-in-out
  -ms-transition-property: $properties
  -ms-transition-duration: $transitionTime
  -ms-transition-timing-function: ease-in-out
  -o-transition-property: $properties
  -o-transition-duration: $transitionTime
  -o-transition-timing-function: ease-in-out
  
=clearfix
  &:after
    content: ""
    display: table
    clear: both

@media screen and (min-width: $menuFold) 
  .menu-link
    margin: 0 0 0 -64px !important
  
  .mainNav
    margin: 40px 0 0 0 !important
  
@media screen and (min-width: 630px) 
  .content
    width: 65%
    float: left
  
  .sidebar
    width: 30%
    float: right

.main
  width: 100%
  max-width: 940px
  padding: 40px
  margin: 20px auto
  box-sizing: border-box
  background: lighten($primaryColor, 10%)
  color: darken($primaryColor, 40%)
  +clearfix
  
  .title
    color: lighten($primaryColor, 50%)
  
  .content, .sidebar
    padding: 10px 20px
    background: lighten($primaryColor, 20%)
    box-sizing: border-box
    margin-bottom: 20px

html, body
  margin: 0
  padding: 0
  height: 100%
  width: 100%

body
  background: $primaryColor
  font-family: 'Economica'
  a
    text-decoration: none

.navigation
  display: table
  position: fixed
  top: 0
  height: 100%
  background: darken($primaryColor,5%)
  box-shadow: 0 0px 20px darken($primaryColor,20%)

.mainNav
  list-style: none
  padding: 0
  margin: 40px 0 0 -150px
  font-size: 150%
  width: 150px
  +transition(margin)
    
  &:after
    display: block
    content: ''
    position: absolute
    background: rgba(0,0,0,0.1)
    width: 0
    height: 100vh
    top: 0
    left: 0
    +transition(background, left)
      
  li a
    padding: 15px 25px
    color: #fff
    display: block
    border-bottom: 1px solid darken($primaryColor,10%)

#menu
  display: none

#menu:checked + .menu-link + .mainNav
  margin: 40px 0 0 0
  &:after
    display: block
    background: rgba(0,0,0,0.7)
    left: 150px
    width: 100vw
    height: 100vh
    +transition(background, left)
    
#menu:checked + .menu-link 
  margin: 0
  &:before 
    transform: rotate(225deg)
    top: 18px
    width: 25px
    margin: 0 0 0 -13px
    
  &:after 
    transform: rotate(-225deg)
    top: 18px
    width: 25px
    margin: 0 0 0 -13px

.menu-link 
  color: #fff
  display: inline-block
  font-size: 1.125rem
  text-transform: uppercase
  font-weight: 700
  position: relative
  padding: 33px 15px 10px
  margin: 0 -64px 0 0
  cursor: pointer
  
  background: darken($primaryColor,10%)
  display: inline-block
  +transition(all)
  
  &:hover
    background: darken($primaryColor,20%)
  
  &:before 
    content: ""
    background: #fff
    height: 4px
    width: 34px
    position: absolute
    top: 13px
    left: 50%
    margin: 0 0 0 -17px
    display: block
    +transition(all)
  
  &:after 
    content: ""
    background: #fff
    height: 4px
    width: 34px
    position: absolute
    top: 25px
    left: 50%
    margin: 0 0 0 -17px
    display: block
    +transition(all)
            
          
!
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