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

              
                <nav class="archive-links">
  <ol>
    <li>
      <a href="#">
        <div class="main-image"></div>
        <span class="link-title">Tellus Cursus Magna Vestibulum</span>
        <span class="link-excerpt"><time class="date" datetime="November 12 2012">Nov 12, 2012</time> / No Comments</span>
      </a>
    </li>
    <li>
      <a href="#">
        <div class="main-image"></div>
        <span class="link-title">Justo Adipiscing Tristique ...</span>
        <span class="link-excerpt"><time class="date" datetime="November 05 2012">Nov 05, 2012</time> / No Comments</span>
      </a>
    </li>
    <li>
      <a href="#">
        <div class="main-image"></div>
        <span class="link-title">Herman Miller - Why Design</span>
        <span class="link-excerpt"><time class="date" datetime="November 01 2012">Nov 01, 2012</time> / No Comments</span>
      </a>
    </li>
    <li>
      <a href="#">
        <div class="main-image"></div>
        <span class="link-title">Eames Lounge Chair</span>
        <span class="link-excerpt"><time class="date" datetime="November 01 2012">Nov 01, 2012</time> / 1 Comment</span>
      </a>
    </li>
    <li>
      <a href="/#">
        <div class="main-image"></div>
        <span class="link-title">COODO Modular</span>
        <span class="link-excerpt"><time class="date" datetime="June 25 2012">Jun 25, 2012</time> / 1 Comment</span>
      </a>
    </li>
  </ol>
</nav>
              
            
!

CSS

              
                /* variables */
@vgrid: 30px;
@gutter: 30px;
@pgcolor: #FFF;
@textcolor: #777;
@hovercolor: #2690d8;
@basefontsize: 16px;

body {
  font-family: "Helvetica Neue", Helvetica, Arial, serif;
  background: darken(@pgcolor, 3%);
  padding: @vgrid @gutter;
}

nav.archive-links {

  background-color: @pgcolor;
  box-sizing: content-box;
  padding: 0;
  margin: auto;
  max-width: 50%;

  /* Ordered list with custom counter */
  ol {
    counter-reset: li;
    overflow: hidden;
    border: 1px solid darken(@pgcolor, 15%);
    margin: 0;
    padding: 0px;
  }

  ol li {
    float: left;
    clear: left;
    width: 100%;
    margin: 0;
    list-style: none;
  }

  ol,
  ol li,
  ol li a { display: block; }

  ol li a {
    font-size: (@basefontsize * 0.6875);
    height: (@vgrid * 2 - 1);
    position: relative;
    text-decoration: none;
  }

  ol li .main-image:after,
  ol li .no-main-image:after {
    color: lighten(@textcolor, 25%);
    content: counter(li, decimal-leading-zero);
    counter-increment: li;
    font-size: @vgrid;
    line-height: (@vgrid * 2 - 1);
    height: (@vgrid * 2 - 1);
    width: (@gutter * 2);
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    font-weight: 100;
    letter-spacing: 1px;
  }

  li .main-image,
  li .no-main-image {
    float: left;
    margin-right: 1.5em;
    width: (@vgrid * 2);
    height: (@vgrid * 2);
    background: darken(@pgcolor, 10%);
  }

  li .main-image {
    /*background-image: url('http://placekitten.com/g/200/200');*/
    background-size: cover;
    background-position: center center;
  }

  a:link,
  a:visited,
  a:hover,
  a:active { color: darken(@textcolor, 50%); }

  ol li a:hover .main-image:after,
  ol li a:hover .no-main-image:after { color: @hovercolor; }

  ol li a:active .main-image:after,
  ol li a:active .no-main-image:after, 
  ol li.active a .main-image:after,
  ol li.active a .no-main-image:after { color: @textcolor; }


  li + li { border-top: 1px solid darken(@pgcolor, 15%); }

  li span {
    display: block;
    line-height: 1.5em;
  }
  
  /* Style the title, date & comments of each entry */
  span.link-title {
    letter-spacing: 1px;
    text-transform: uppercase;
    padding-top: 0.6875em;
    font-size: 1.5em;
  }

  span.link-excerpt { color: lighten(@textcolor, 30%); }

}
              
            
!

JS

              
                
              
            
!
999px

Console