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

              
                <h1>Two-values for display</h1>

<p>If you have <strong>Firefox 70</strong> you can try out the new two-value syntax for display.</p>

<h2>A block box with flex children</h2>

<div class="box block-flex">
  <div>One</div>
  <div>Two</div>
  <div>Three</div>
</div>

<h2>An inline box with grid children</h2>

<div class="box inline-grid">
  <div>One</div>
  <div>Two</div>
  <div>Three</div>
</div>

<h2>A block box with flow layout children</h2>

<div class="box block-flow">
  <h3>A heading</h3>
  <p>Paragraph one.</p>
  <p>Paragraph two.</p>
</div>

<h2>display: inline-block?</h2>

<p class="inline-flow-root">This sentence includes a <span>span</span> it has been set to display: inline flow-root. This is the same as display: inline-block.</p>

<h2>Find out more</h2>

<p>To understand the two-value syntax for display, try these resources:</p>

<ul>
  <li><a href="https://www.smashingmagazine.com/2019/04/display-two-value/">Digging Into The Display Property: The Two Values Of Display</li>
  <li><a href="https://noti.st/rachelandrew/lDqTZ7/does-it-work-using-the-new-css-layout">Slides from my talk "Does it work?" which covers the two-value syntax</a></li>
  <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Display">MDN: display</a></li>
</ul>


              
            
!

CSS

              
                body {
  background-color: #fff;
  color: #00171F;
  font: 110% 'Open Sans', sans-serif;
  padding: 1em;
}

h1, h2 {
  font-family: 'Proza Libre', serif;
}

h2 {
  margin-top: 2em;
}

.box {
  border: 5px solid #003459;
  padding: 10px;
}

.box > div {
  background-color: #007EA7;
  color: #fff;
}

.block-flex {
  display: block flex;
  gap: 10px;
}

.inline-grid {
  display: inline grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.block-flow {
  display: block flow;
}

.inline-flow-root {
  width: 350px;
}

span {
  background-color: #007EA7;
  color: #fff;
  border: 5px solid #003459;
  padding: 1em;
  display: inline flow-root;
}
              
            
!

JS

              
                
              
            
!
999px

Console