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


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


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.


  .title All scrolling
    %span.logo Logo
    %span.nav-item Blog
    %span.nav-item Portfolio
    %span.nav-item Downloads
    %span.nav-item About
    %span.nav-item Contact

  .title Nav only scrolling
    %span.logo Logo
      %span.nav-item Blog
      %span.nav-item Portfolio
      %span.nav-item Downloads
      %span.nav-item About
      %span.nav-item Contact

  .title Nav separated
    %span.logo Logo
    %span.nav-item Blog
    %span.nav-item Portfolio
    %span.nav-item Downloads
    %span.nav-item About
    %span.nav-item Contact


              // Make each area overflow horizontally and
// have the ability to have other items
// scrolled into view
.scroll {
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar; }

// Hide scrollbars, works well with Flickity without downside.
.scroll::-webkit-scrollbar {
  display: none; }

// Example two required styles --------------- /
.example-two-header {
  .logo {
    width: 25%; }
  nav {
    width: 75%; } }

// Example three required styles --------------- /
.example-three {
  nav {
    width: 100%; }
  .nav-item {
    color: #f6f7ee; } }

// Shared styles --------------- /
header {
  background: #152637; }

// Examples
.example-two-header {
  border-radius: 3px; }

.example-three-header {
  border-radius: 3px 3px 0 0; }

.example-three nav {
  background: #727c87;
  border-radius: 0 0 3px 3px; }

// Logo
.logo {
  text-align: center; // only effective in example 2/3
  font-weight: 700;
  color: #727c87;
  border-right: 1px solid rgba(#727c87, .4);
  padding: 13px 24px 12px; }

// Nav items
.nav-item {
  padding: 13px 16px 12px;

  &:not(:last-child) {
    border-right: 1px solid rgba(#727c87, .2); } }

// Setup/misc styles --------------- /
* { 
  box-sizing: border-box; }

body {
  max-width: 360px;
  margin: 5% auto;
  color: #64cce3;
  line-height: 1.5; }

// Remove the inline-block extra space
nav { 
  font-size: 0; }

// Requires font size to be reset for these elements
.nav-item {
  font-size: 14px; }

.vertical-align-middle {
  display: inline-block;
  vertical-align: middle; }

.title {
  margin: 24px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #999; }

/*! Flickity v1.1.1
---------------------------------------------- */
.flickity-enabled {
  position: relative; }

.flickity-enabled:focus { 
  outline: none; }

.flickity-viewport {
  position: relative;
  height: 100%; }

.flickity-slider {
  position: absolute;
  width: 100%;
  height: 100%; }

/* Draggable */ {
  -webkit-tap-highlight-color: transparent;
          tap-highlight-color: transparent;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none; } .flickity-viewport {
  cursor: move;
  cursor: -webkit-grab;
  cursor: grab; } {
  cursor: -webkit-grabbing;
  cursor: grabbing; }


              function is_touch_device()
  // Checks for existence in all browsers and IE10/11 & Surface
  return 'ontouchstart' in window || navigator.maxTouchPoints;

var navs = document.querySelectorAll('.scroll');

if (!is_touch_device())
  for ( var i = 0, length = navs.length; i < length; i++ ) {
    var nav = navs[i];
    new Flickity( nav, {
      cellAlign: 'left',
      freeScroll: true,
      prevNextButtons: false,
      pageDots: false,
      contain: true