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

              
                html
 body
    input#navToggle(type='checkbox')
    header
     label.navToggle(for='navToggle', tabindex='0', onclick='onclick') ☰
     nav(role="navmenu")
      ul
       li
        a ᳀
       li.multi
         input#navToggleMulti1(type='checkbox')
         label(for='navToggleMulti1', onclick='onclick') ∮
         ul.dropdown
          li
           a 1
          li
           a 2
          li
           a 3
          li
           a 4
          li
           a 5
          li
           a 6
       li.multi
         input#navToggleMulti2(type='checkbox')
         label(for='navToggleMulti2' onclick='onclick') ⏲
         ul.dropdown
          li
           a 1
          li
           a 2
          li
           a 3
          li
           a 4
          li
           a 5
          li
           a 6
       li
        a ⛺
       li
        a ⭓
       li
        a ⵘ
              
            
!

CSS

              
                //settings
$navmenu-width: 7em;
$navmenu-height: 5em;
$navmenu-color: #1e1e1e;
$navmenu-hover-color: firebrick;
$navmenu-drop-color: firebrick;
$navmenu-drop-hover-color: firebrick;
$navmenu-drop-text-color: whitesmoke;
$navmenu-text-color: whitesmoke;
// https://meyerweb.com/eric/tools/css/reset/
// v2.0 | 20110126
// License: none (public domain)
@mixin meyer-reset {
  html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
  }

  // HTML5 display-role reset for older browsers
  article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
  }
  body {
    line-height: 1;
  }
  ol, ul {
    list-style: none;
  }
  blockquote, q {
    quotes: none;
  }
  blockquote {
    &:before, &:after {
      content: "";
      content: none;
    }
  }
  q {
    &:before, &:after {
      content: "";
      content: none;
    }
  }
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
}

@include meyer-reset;

$break-small: 320px;
$break-medium: 740px;
$break-large: 1220px;
//http://timpietrusky.com/advanced-checkbox-hack
body { -webkit-animation: bugfix infinite 1s; }
@-webkit-keyframes bugfix { from {padding:0;} to {padding:0;} }
//http://codeboxers.com/sass-mixin-for-transitions/
@mixin transition($transition-property, $transition-time, $method) {
    -webkit-transition: $transition-property $transition-time $method;
    -moz-transition: $transition-property $transition-time $method;
    -ms-transition: $transition-property $transition-time $method;
    -o-transition: $transition-property $transition-time $method;
    transition: $transition-property $transition-time $method;
}
//http://thesassway.com/intermediate/responsive-web-design-in-sass-using-media-queries-in-sass-32
@mixin respond-to($media) {
  @if $media == handhelds {
    @media only screen and (max-width: $break-small) { @content; }
  }
  @else if $media == small-screens {
    @media only screen and (min-width: $break-small + 1) and (max-width: $break-medium - 1) { @content; }
  }
  @else if $media == medium-screens {
    @media only screen and (min-width: $break-medium + 1) and (max-width: $break-large - 1) { @content; }
  }
  @else if $media == wide-screens {
    @media only screen and (min-width: $break-large) { @content; }
  }
}
body {
  overflow: hidden;
  background: $navmenu-color;
}

//Hide checkboxes
#navToggle, nav[role="navmenu"] ul li.multi input {
  display: none;
}

header label.navToggle {
  line-height: $navmenu-height;
  text-align: center;
  z-index: 10;
  cursor: pointer;
  display: inline-block;
  background: $navmenu-hover-color;
  color: $navmenu-color;
  @include transition(all, 0.2s, ease-in-out);
  @include respond-to(handhelds) { width: 100%; }
  @include respond-to(small-screens) { width: 100%; }
  @include respond-to(medium-screens) { width: $navmenu-width; }
  @include respond-to(wide-screens) { width: $navmenu-width; }
  &:hover {
    background: $navmenu-text-color;
    color: $navmenu-color;
  }
}

#navToggle:checked ~ header nav[role="navmenu"] {
  @include respond-to(handhelds) { left: -100%;}
  @include respond-to(small-screens) { left: -100%;}
  @include respond-to(medium-screens) { left: -$navmenu-width; }
  @include respond-to(wide-screens) { left: -$navmenu-width;}
}

nav[role="navmenu"] ul li.multi input:checked ~ .dropdown li {
    max-height: 100%;
}
nav[role="navmenu"] ul li.multi input:checked ~ .dropdown {
    width: 100%;
    pointer-events: auto;
}
nav[role="navmenu"] ul li.multi input:checked ~ label {
    background: $navmenu-hover-color;
    font-weight: 700;
}
nav[role="navmenu"] ul li.multi input:checked ~ label:after {
    transform: rotateZ(0deg);
}

nav[role="navmenu"] {
  position: absolute;
  left: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  max-height: 100%;
  @include transition(all, 0.2s, ease-in-out);
  @include respond-to(handhelds) { width: 100%;top: $navmenu-height;}
  @include respond-to(small-screens) { width: 100%; top: $navmenu-height;}
  @include respond-to(medium-screens) { width: $navmenu-width; }
  @include respond-to(wide-screens) { width: $navmenu-width;}
}

nav[role="navmenu"] ul li a,  nav[role="navmenu"] .dropdown li a, nav[role="navmenu"] ul li label {
  background: $navmenu-color;
  color: $navmenu-text-color;
  @include transition(all, 0.2s, ease-in-out);
  @include respond-to(handhelds) { width: 100%;}
  @include respond-to(small-screens) { width: 100%;}
  @include respond-to(medium-screens) { width: $navmenu-width; }
  @include respond-to(wide-screens) { width: $navmenu-width; }
}
nav[role="navmenu"] .dropdown li a {
 background: $navmenu-drop-color;
 color: $navmenu-drop-text-color;
}
nav[role="navmenu"] ul li, nav[role="navmenu"] ul li a, , nav[role="navmenu"] ul li label {
  text-align: center;
}
nav[role="navmenu"] .dropdown li a {
  height: $navmenu-height;
  cursor: pointer;
  font-weight: 400;
}
nav[role="navmenu"] ul li a, nav[role="navmenu"] ul li label {
  outline: none;
  display: inline-block;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  line-height: $navmenu-height;
  &:hover {
    background: $navmenu-hover-color;
    font-weight: 700;
  }
}
nav[role="navmenu"] ul li label {
  &:hover {
    background: $navmenu-drop-hover-color;
    font-weight: 700;
  }  
}
nav[role="navmenu"] ul li.multi label {
  &:after {
    @include transition(all, 0.2s, ease-in-out);
    position: absolute;
    transform: rotateZ(-90deg);
    top: 0;
    right: 1em;
    content: '▼';
  }
}
nav[role="navmenu"] ul li .dropdown {
  width: 0;
  position: relative;
  pointer-events: none;
  @include transition(width, 0.2s, linear);
}
nav[role="navmenu"] ul li .dropdown li {
  max-height: 0;
  overflow: hidden;
  @include transition(max-height, 0.35s, cubic-bezier(0.175, 0.885, 0.32, 1.275));
  z-index: 10;
}
//https://gist.github.com/jslegers/6088809
/**
 * Mixin scrollbar
 */
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) {
	::-webkit-scrollbar {
		width:  $size;
		height: $size;
	}
 
	::-webkit-scrollbar-thumb {
		background: $primary;
	}
 
	::-webkit-scrollbar-track {
		background: $secondary;
	}
  
  // For Internet Explorer
  body {
    scrollbar-face-color: $primary;
    scrollbar-track-color: $secondary;
  }
}
@include scrollbar(.5em, $navmenu-hover-color);
              
            
!

JS

              
                
              
            
!
999px

Console