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

              
                <div id="menus" class="main">
  <h2 class="typo_h2">Menu with all features: responsive, heading, dropdown</h2>

  <!-- MENU -->
  <h3 class="typo_h3">Default</h3>
  <nav class="menu">
    <div class="menu_header">
      <a href="#" class="menu_a menu_brand">Brand</a>
      <label class="btn menu_burger" for="menu_trigger1">Show menu</label>
    </div>

    <input type="checkbox" id="menu_trigger1" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>

  &nbsp;
  
  <h3 class="typo_h3">Primary</h3>
  <nav class="menu menu-primary">
    <div class="menu_header">
      <a href="#" class="menu_a menu_brand">Brand</a>
      <label class="btn btn--primary menu_burger" for="menu_trigger-2">Show menu</label>
    </div>

    <input type="checkbox" id="menu_trigger-2" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>

  &nbsp;

  <h3 class="typo_h3">Secondary</h3>
  <nav class="menu menu-secondary">
    <div class="menu_header">
      <a href="#" class="menu_a menu_brand">Brand</a>
      <label class="btn btn--secondary menu_burger" for="menu_trigger-3">Show menu</label>
    </div>

    <input type="checkbox" id="menu_trigger-3" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>

  &nbsp;
  
  <h3 class="typo_h3">Black</h3>
  <nav class="menu menu-black">
    <div class="menu_header">
      <a href="#" class="menu_a menu_brand">Brand</a>
      <label class="btn btn--black menu_burger" for="menu_trigger-4">Show menu</label>
    </div>

    <input type="checkbox" id="menu_trigger-4" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>

  &nbsp;
  
  <h3 class="typo_h3">Flat</h3>
  <nav class="menu menu-primary-flat">
    <div class="menu_header">
      <a href="#" class="menu_a menu_brand">Brand</a>
      <label class="btn btn-primary-flat menu_burger" for="menu_trigger-6">Show menu</label>
    </div>

    <input type="checkbox" id="menu_trigger-6" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>
  &nbsp;
  <h3 class="typo_h3">Vertical</h3>
  <nav class="menu menu-primary-vert col col-md3">
    <div class="menu_header">
      <label class="menu_a menu_brand" for="menu_trigger-7"><i class="icon icon__menu"></i> Brand</label>
    </div>

    <input type="checkbox" id="menu_trigger-7" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>
  
  <nav class="menu menu-primary-fixedTop">
    <div class="menu_header">
      <a href="#" class="menu_a menu_brand">Fixed Top</a>
      <label class="btn btn-primary menu_burger" for="menu_trigger-5">Show menu</label>
    </div>

    <input type="checkbox" id="menu_trigger-5" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>
  
  <nav class="menu menu-secondary-fixedBottom">
    <div class="menu_header">
      <a href="#" class="menu_a menu_brand">Fixed Bottom</a>
      <label class="btn btn-secondary menu_burger" for="menu_trigger-8">Show menu</label>
    </div>

    <input type="checkbox" id="menu_trigger-8" class="menu_trigger">

    <ul class="menu_ul">
      <li class="menu_li menu_active"><a class="menu_a" href="#">Home</a></li>
      <li class="menu_li menu_parent">
        <a class="menu_a">Services</a>
        <ul class="menu_ul-dropdown">
          <li class="menu_li"><a class="menu_a" href="#">Service 1</a></li>
          <li class="menu_li menu_parent">
            <a class="menu_a">Service 2</a>
            <ul class="menu_ul-dropdown">
              <li class="menu_li"><a class="menu_a" href="#">Service 2.1</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.2</a></li>
              <li class="menu_li"><a class="menu_a" href="#">Service 2.3</a></li>
            </ul>
          </li>
          <li class="menu_li"><a class="menu_a" href="#">Service 3</a></li>
        </ul>
      </li>
      <li class="menu_li"><a class="menu_a" href="#">Blog</a></li>
      <li class="menu_li"><a class="menu_a" href="#">About Us</a></li>
      <li class="menu_li"><a class="menu_a" href="#">Contact Us</a></li>
    </ul>
  </nav>
</div>

<div class="fab">
  <span class="tooltip tooltip-left" data-tooltip="Show grid">
    <a class="fab_btn btn btn-default-radius">
      <i class="icon icon_grid-on"></i>
    </a>
  </span>
</div>
              
            
!

CSS

              
                @import "lesshat";

// Grey color swatch
@grey:         @grey400;

@grey0:        #FFFFFF;
@grey50:       #FAFAFA;
@grey100:      #F5F5F5;
@grey200:      #EEEEEE;
@grey300:      #E0E0E0;
@grey400:      #BDBDBD;
@grey500:      #9E9E9E;
@grey600:      #757575;
@grey700:      #616161;
@grey800:      #424242;
@grey900:      #212121;
@grey1000:     #000000;

@screen-xs:                  480px;
@screen-sm:                  768px;
@screen-md:                  992px;
@screen-lg:                  1200px;
@grid-baseline: 8px;
@font-line-height: @grid-baseline*3;

.main {
  padding: @font-line-height*3 @font-line-height;
}

.paint {
  background: @grey300;
  outline: 1px solid @grey400;

  &:hover {
    background-color: @grey200;
  }
}

.fab {
  padding-right: @grid-baseline*2;
  padding-bottom: @font-line-height*2.5;
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 10000;

  @media (min-width: @screen-sm) {
      padding-right: @font-line-height;
  }

  &_btn {
    width: @grid-baseline*7;
    height: @grid-baseline*7;
    padding: @grid-baseline*2-2;
  }

  .icon {
    position: relative;
    width: @font-line-height;
    height: @font-line-height;

    &:before {
      position: absolute;
      top: 0;
      left: 0;
      line-height: @font-line-height;
    }
  }
}

// Debug vertical rythm
body[class*=-showGrid]:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-image: -moz-linear-gradient(bottom, rgba(240, 162, 196, 0.50) 5%, rgba(240, 162, 196, 0) 5%);
  background-image: -webkit-linear-gradient(bottom, rgba(240, 162, 196, 0.50) 5%, rgba(240, 162, 196, 0) 5%);
  background-image: linear-gradient(to top, rgba(240, 162, 196, 0.50) 5%, rgba(240, 162, 196, 0) 5%);
  -moz-background-size: 100% 24px;
  -o-background-size: 100% 24px;
  -webkit-background-size: 100% 24px;
  background-size: 100% 24px;
  background-position: left top;
}
              
            
!

JS

              
                var fab = document.querySelector('.fab_btn'),
    fab_icon = document.querySelector('.fab_btn .icon'),
    body = document.getElementsByTagName('body')[0];

fab.addEventListener('click', function () {
  if (body.className == '' && fab_icon.className == 'icon icon_grid-on') {
    body.className += '-showGrid';
    fab_icon.className = fab_icon.className.replace(/-on/gi, '-off');
  } else {
    body.className = body.className.replace('-showGrid', '');
    fab_icon.className = fab_icon.className.replace(/-off/gi, '-on');
  }
})
              
            
!
999px

Console