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

              
                <div class="description">
  <h1>CSS Columns with Flexbox</h1>
  <p>When elements with CSS columns applied have flexbox children, some rendering engines seem to split descendant elements across columns.</p>
  <ul>
    <li><strong>Webkit</strong> <em>(Tested in Safari 10.0.1 r208047 & Safari Tech Preview Release 16)</em><br>Cuts the text and input and renders some of both in both columns.</li>
    <li><strong>Blink</strong> <em>(Tested in Chrome 54 & Opera 41)</em><br>Renders some of the input in both columns.
      <ul>
        <li>First example: the bottom border from the last input in the left column gets drawn at the top of the right column.</li>
        <li>Second example: The top few pixels of the input are drawn on the left column and the rest of the input is on the right.</li>
      </ul>
    </li>
  </ul>
</div>
<hr>
<div class="wrapper">
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
</div>
<hr>
<div class="wrapper pad-rows">
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
  <div class="row"><label>Label</label><input type="text"></div>
</div>
              
            
!

CSS

              
                /**
 * Relevant styles
 */
.wrapper {
  column-count: 2;
}
.row {
  display: flex;
}
// Second example adds padding to force 3rd item into right column
.pad-rows .row {
  padding-top: 12px;
}

/**
 * Other styles
 */
.description {
  margin: 0 1em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  line-height: 1.5;
  
  > ul > li + li {
    margin-top: 1em;
  }
  em {
    font-size: 0.875em;
    color: darkgray;
  }
}
input {
  margin-left: 1em;
}
hr {
  margin: 1em 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console