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 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

Packages

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.

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

              
                .container.example-one
  .title All scrolling
  %header.example-one-header.scroll
    %span.logo Logo
    %nav.flex
      %span.nav-item Blog
      %span.nav-item Portfolio
      %span.nav-item Downloads
      %span.nav-item About
      %span.nav-item Contact
 
.container.example-two
  .title Nav only scrolling
  %header.example-two-header.flex
    %span.logo Logo
    %nav.scroll
      %span.nav-item Blog
      %span.nav-item Portfolio
      %span.nav-item Downloads
      %span.nav-item About
      %span.nav-item Contact

.container.example-three
  .title Nav separated
  %header.example-three-header
    %span.logo Logo
  %nav.scroll
    %span.nav-item Blog
    %span.nav-item Portfolio
    %span.nav-item Downloads
    %span.nav-item About
    %span.nav-item Contact
              
            
!

CSS

              
                // 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-one-header,
.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
.logo,
.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
.logo,
.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; }
              
            
!

JS

              
                
              
            
!
999px

Console