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

              
                <body class="wrap">
  <div class="index">
    <div class="site__logo"><a href="/">Site Title</a></div>
    <article class="page__wrap">
      <header class="page__header">
        <h1 class="page__title">Category Title</h1>
        <p class="page__excerpt">Tacos hella mumblecore, master cleanse franzen lo-fi normcore. Bitters cornhole schlitz ugh health goth, next level flexitarian YOLO before they sold out. Celiac keffiyeh wolf cardigan tumblr.</p>
      </header>
      <div class="page__cover">
      </div>
      <section class="page__content">
        <div class="list">
        <article class="item">
          <a href="#">
            <div class="item__content">
              <h3 class="item__title">This is a title that could be really long so let's see if it breaks anything OK?</h3>
              <div class="item__meta">4 min read</div>
              <div class="item__excerpt"><p>Health goth literally 3 wolf moon, iPhone mlkshk semiotics put a bird on it bespoke crucifix gochujang roof party pickled echo park. +1 narwhal small batch you probably haven't heard of them. Put a bird on it mlkshk freegan chartreuse food truck.</p>
              </div>
            </div>
            <div class="item__image"><img src="https://unsplash.it/400/250?image=55" alt=""></div>
          </a>
        </article>
        <article class="item">
          <a href="#">
            <div class="item__content">
              <h3 class="item__title">This is a title</h3>
              <div class="item__meta">12 min read</div>
              <div class="item__excerpt">
                <p>Health goth literally 3 wolf moon.</p>
              </div>
            </div>
            <div class="item__image"><img src="https://unsplash.it/400/250?image=56" alt=""></div>
          </a>
        </article>
        <article class="item">
          <a href="#">
            <div class="item__content">
              <h3 class="item__title">This is another title</h3>
              <div class="item__meta">9 min read</div>
              <div class="item__excerpt">
                <p>Health goth literally 3 wolf moon, iPhone mlkshk semiotics put a bird on it bespoke crucifix gochujang roof party pickled echo park. +1 narwhal small batch you probably haven't heard of them. Put a bird on it mlkshk freegan chartreuse food truck.</p>
              </div>
            </div>
            <div class="item__image"><img src="https://unsplash.it/400/250?image=57" alt=""></div>
          </a>
        </article>
        <article class="item">
          <a href="#">
            <div class="item__content">
              <h3 class="item__title">This is another title 3</h3>
              <div class="item__meta">5 min read</div>
              <div class="item__excerpt">
                <p>Health goth literally 3 wolf moon, iPhone mlkshk semiotics put a bird on it bespoke crucifix gochujang roof party pickled echo park. +1 narwhal small batch you probably haven't heard of them. Put a bird on it mlkshk freegan chartreuse food truck.</p>
              </div>
            </div>
            <div class="item__image"><img src="https://unsplash.it/400/250?image=58" alt=""></div>
          </a>
        </article>
      </div>
      </section>
    </article>
  </div>
  <footer class="site__footer">
    <span>Copyright info.</span>
  </footer>
</body>
              
            
!

CSS

              
                // list
.list {
  
  a {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    
    @include breakpoint($medium) {
      flex-direction: row;
      align-items: center;
    }
    
    @include breakpoint($medium-wide) {
      margin-right: -1 * span(2 of 8);
    }
  }
}

// list item
.item {
  
  &:not(:last-child) {
    margin-bottom: 3em;
  }
}

.item__content {
  
  @include breakpoint($medium) {
    flex-basis: span(75%);
    padding-right: 2em;
  }
}

.item__title {
  position: relative;
  margin: 0.5em 0 1em;
  font-family: $sans-serif;
  font-size: 1.563em;
  line-height: 1.25;
  
  &:before {
    position: absolute;
    bottom: -0.625em;
    content: '';
    height: 0.125em;
    width: 2em;
    background-color: #333;
  }
}

.item__meta {
  font-family: $sans-serif;
  font-size: 0.8em;
}

.item__image {
  order: -1;
  max-width: 400px;
  max-height: 250px;
  overflow: hidden;
  
  @include breakpoint($medium) {
    order: initial;
    flex-basis: span(25%);
    max-width: 200px;
    max-height: 125px;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
  }
  
  img {
    width: 100%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console