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

              
                <article class="wrapper">
  
  <h1>Geese</h1>
  <p class="byline">Our garden correspondent</h1>

<div class="thread">
<p>Duis nec pulvinar magna. Cras pellentesque sapien sit amet sem faucibus consequat. In ac sapien et orci luctus feugiat. Curabitur eget neque sed nibh elementum bibendum. Morbi faucibus nisl a quam vehicula varius. Nunc egestas a mi eu facilisis. Donec luctus ornare ullamcorper.</p>

<p>Curabitur id enim ac velit pulvinar tincidunt dapibus vitae libero. Nulla egestas venenatis ex, et rhoncus ex molestie sed. Aenean convallis dolor vel ipsum condimentum, rhoncus venenatis dolor egestas. Curabitur id sapien placerat, porta tellus vel, viverra odio. Sed dapibus ultricies tempor. Nunc nec metus ipsum. Etiam nec lacus eros. Ut interdum eget orci eu maximus. Curabitur sodales eget massa eu ullamcorper. Mauris lobortis lacus at elit tempor, et pharetra enim malesuada.</p>

<p>Aenean vestibulum, urna non porta viverra, dolor nulla luctus ex, at pulvinar metus tellus nec ligula. Nullam eros urna, rhoncus sit amet lacinia fringilla, accumsan vel neque. Nullam sodales efficitur sagittis. In eu sapien vel leo fringilla semper ut eu magna. Aliquam erat volutpat. In iaculis sem sed ornare porttitor. Proin ex purus, eleifend quis dui bibendum, egestas accumsan diam. Aliquam mauris mi, finibus id quam et, viverra condimentum ante. Sed posuere nibh vitae neque tincidunt eleifend. Aenean vel bibendum sem, ut efficitur nisl. Aliquam mollis iaculis varius. Donec interdum massa ut justo lacinia laoreet. Quisque scelerisque risus sit amet cursus fermentum. Nulla faucibus erat consectetur velit commodo, sed accumsan lacus commodo. Cras sit amet ipsum ut metus laoreet sollicitudin quis faucibus nisi. Donec scelerisque id nibh id auctor.</p>

<p>Quisque elit neque, laoreet sed metus sagittis, aliquet vulputate orci. Vestibulum feugiat ligula risus, a efficitur magna imperdiet non. Morbi tempor, urna at sagittis venenatis, purus felis ornare leo, sit amet luctus eros quam sit amet lectus. Nulla odio tortor, molestie ornare consequat non, porttitor vitae elit. Curabitur maximus pretium nisi et porttitor. Etiam posuere ullamcorper consequat. Aenean a eleifend magna. Vestibulum nec molestie mi. Sed nulla ligula, mollis sit amet placerat volutpat, imperdiet sed lorem.</p>
</div>
<figure class="geese1">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/18106206256_db458f0c58_z.jpg" alt="fig1">
  <figcaption><a href="https://www.flickr.com/photos/132033298@N04/18106206256/">Geese</a></figcaption>
</figure>
 <figure class="geese2">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/2484281394_620764ce90_z.jpg" alt="fig1">
  <figcaption><a href="https://www.flickr.com/photos/atoach/2484281394">Goose</a></figcaption>
</figure>
</article>

<div class="regions">
  <div class="from-heading"></div>
  <div class="from-byline"></div>
  <div class="from-thread-a"></div>
  <div class="from-geese1"></div>
  <div class="from-thread-b"></div>
  <div class="from-thread-c"></div>
  <div class="from-geese2"></div>
  <div class="from-thread-end"></div>
  
</div>
              
            
!

CSS

              
                .thread {
-webkit-flow-into: thread;
}

h1 {
  -webkit-flow-into: heading;
  font-size: 30vmin;
}

img {
  max-width: 100%;
}

.byline {
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: .5rem 0;
  -webkit-flow-into: byline;
}

.geese1 {
  -webkit-flow-into: geese1;
}

.geese2 {
  -webkit-flow-into: geese2;
}

.regions {
  display: grid;
}

.from-heading {
  -webkit-flow-from: heading;
}

.from-byline {
  -webkit-flow-from: byline;
}

.from-geese1 {
  -webkit-flow-from: geese1;
  padding: 1em 0;
}

.from-geese2 {
  -webkit-flow-from: geese2;
  padding: 1em 0;
}

.from-thread-a, .from-thread-b, .from-thread-c {
  -webkit-flow-from: thread;
  height: 10em;
}

.from-thread-end {
  -webkit-flow-from: thread;
}

@media (min-width: 400px) {
  .regions {
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 20px;
  }
  
  .from-heading {
    grid-column: 1 / 3;
  }
  
  .from-byline {
    grid-column: 2;
    grid-row: 2;
  }
  
 
  .from-thread-a {
    grid-column: 1;
    grid-row: 2;
    height: 3em;
    padding-top: .5rem;
  }
  
  /* have to pull up the next row to account for styling on the byline,
  also have no way to balance these columns. We need a kind of regions/multicol hybrid for that*/
  .from-thread-b {
    grid-column: 1;
    grid-row: 3;
    height: 24em;
    margin-top: -1.5em;
  }
  
  .from-thread-c {
    grid-column: 2;
    grid-row: 3;
    height: 24em;
    
  }
  
  .from-thread-end {
    grid-column:  1 / 3;
    grid-row: 5;

  }
  
  .from-geese1 {
    grid-column: 1 / 3;
  }
  
  .from-geese2 {
    grid-column: 1;
  }
}


}
              
            
!

JS

              
                
              
            
!
999px

Console