123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <main class="container">
  <article class="content">
    <header>
      <h1>Things Lucy Maud Montgomery Lied To Me About</h1>
      <p>By <a href="#">Lucy Sook Duncombe</a> <time>1 hour ago</time> in <a href="#">The Butter</a></p>
    </header>
    <img src="http://placehold.it/800x450"/>
    <p>That after an ugly childhood and gawky adolescence, I would blossom into a legendary beauty, the type of which that would awe strangers and be best described as “lissome” and “shining,” instead of being someone who obsessively watched makeup tutorials on Youtube and yet still manages to go out with one eye made up perfectly and the other one looking like it had been made up by a drunken goat with only one hoof.</p>
    <p>That as an adult woman, I would be judged mostly on the skill of my housekeeping, and people would comment on the cleanliness of my dishcloths and quality of my ironing rather than literally every single other decision I made starting with my clothes and ending somewhere around the way I chose to orient staples in paperwork.</p>
  </article>

  <section class="sidebar">
    <h1>Most popular</h1>

    <ol class="ranked-list">
      <li>
        <article class="summary">
          <h1><a href="#">This Writer’s On Fire: Rachel Eliza Giffiths</a></h1>
          <img src="http://placehold.it/100x100" alt=""/>
        </article>
      </li>
      <li>
        <article class="summary">
          <h1><a href="#">Millenials Lay Down Their Investments</a></h1>
          <img src="http://placehold.it/100x100" alt=""/>
        </article>
      </li>
      <li>
        <article class="summary">
          <h1><a href="#">Things Lucy Maud Montgomery Lied To Me About</a></h1>
          <img src="http://placehold.it/100x100" alt=""/>
        </article>
      </li>
      <li>
        <article class="summary">
          <h1><a href="#">How To Tell If You Are In A J.R.R. Tolkien Book</a></h1>
          <img src="http://placehold.it/100x100" alt=""/>
        </article>
      </li>
      <li>
        <article class="summary">
          <h1><a href="#">So, You’re Thinking About Seeing A Play?</a></h1>
          <img src="http://placehold.it/100x100" alt=""/>
        </article>
      </li>
      <li>
        <article class="summary">
          <h1><a href="#">Hey Ladies: Take it to Slack</a></h1>
          <img src="http://placehold.it/100x100" alt=""/>
        </article>
      </li>
    </ol>
  </section>
</main>
            
          
!
            
              /* Resets */

* {
  margin: 0;
  padding: 0;
}

a {
  color: mediumaquamarine;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

body {
  display: grid;
  justify-items: center;
}

/* Container */
.container {
  display: grid;
  grid-gap: 2em;
  /* Show content area _above_ the sidebar area */
  grid-template-areas:
    "content"
    "sidebar";
}

@media (min-width: 60em) {
  .container {
    grid-template-columns: minmax(auto, 50em) minmax(auto, 20em);
    grid-template-areas:
      /* Show content area _next to_ the sidebar area */
      "content sidebar"
  }
}

/* Content */
.content {
  grid-area: content; /* Assign this `div` to the grid area named `content` */
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid lightgrey;
  padding: 0.5em;
}

.content > header {
  margin-bottom: 1em;
}

.content > header h1 {
  margin-bottom: 0.25em;
  font-size: 1.75em;
  line-height: 1;
}

.content > header p {
  font: caption;
  color: grey;
}

.content > header a {
  font-weight: bold;
}

.content > p {
  margin-bottom: 0.5em;
  font-size: 1.125em;
}

.content > img {
  order: -1;
  max-width: 100%;
  margin-bottom: 0.5em;
}

/* Sidebar */
.sidebar {
  grid-area: sidebar; /* Assign this `div` to the grid area named `sidebar` */
}

.sidebar > h1 {
  padding: 1em;
  font: menu;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

/* Ranked List */
.ranked-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  counter-reset: popular;
}

.ranked-list > li {
  display: flex;
  flex: 1 1 33%;
}

/* Summary */
.summary {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  padding: 0.5em;
  min-width: calc(100px + 1em);
}

.summary > h1 {
  font-size: 1.125em;
  font-weight: bold;
  line-height: 1.1;
  text-align: center;
}

.summary > h1::before {
  display: block;
  counter-increment: popular;
  content: counter(popular);
  font-size: 1.75em;
  font-style: italic;
  font-weight: normal;
  color: grey;
}

.summary > h1 a:not(:hover) {
  color: inherit;
}

.summary > img {
  order: -1;
  max-width: 100%;
  height: auto;
  margin-bottom: 0.5em;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console