Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div id="app" class="wrapper">
  <div class="header">Header</div>
 
  <div class="main">
    <div class="page-body"><!--extra element to make the layout work and you need to make it flex-->
 
      <div class="sidebar">
        <div class="flex-container-col flex-item"><!--and another extra element you can't get rid of-->
          <div class="subheader">Subheader of sidebar</div>
          <div class="sidebar-content scrollable">
            <p>Sidebar inbox content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>            
          </div>
        </div>
      </div>
 
      <div class="content">
        <div class="flex-container-col flex-item"><!--extra element-->
          <div class="subheader">Subheader of content block</div>
          <div class="content-region scrollable">
            <p>Main content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p>
            <p>Long content</p> 
            <p>Long content</p>             
          </div>
        </div>
      </div>
     </div>
  </div>
 
  <div class="pusher"></div>
</div>
 
<div class="footer">Footer</div>
              
            
!

CSS

              
                // Silent class for scrollable block
.flexbox
  %flex-item-scrollable
    flex: 1 1 auto
    height: 0
 
// General class for setting scroll for all target blocks
.scrollable
  overflow-y: scroll
  &.flex-item
    @extend %flex-item-scrollable
 
// Layout classes
.sidebar-content,
.content-region
  @extend %flex-item-scrollable
              
            
!

JS

              
                
              
            
!
999px

Console