Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

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.


  .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 {
  display: flex;
  flex-wrap: nowrap;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar; }

// Needed for example two
 .flex {
  display: flex;
  flex-wrap: nowrap; }

// Required nav item styles
.logo {
  flex: 0 0 120px; }

.nav-item {
  flex: 0 0 auto; }

// Example three required styles --------------- /
.example-three .logo {
  display: block;
  border: none; }

.example-three .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; }

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

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

// Demo purposes only, proceed with caution on Windows!
.scroll::-webkit-scrollbar {
  display: none; }