octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              %ul
  %li
    .name bla
    .description bla bla bla
    .tags new, old, blue, borrowed
  %li.broken
    .name Broken
    .description shows the problem
    .tags.TARGET
      I want this long list of
      tags to grow the parent
      instead of overflowing
      into the next li.
  %li
    .name bla
    .description bla bla bla
    .tags new, old, blue, borrowed
  %li.fixed
    .name Fixed
    .description shows my solution
    .tags.TARGET
      This solution groes the
      li to fit the ammount of
      text in that is in this
      child.
  %li
    .name bla
    .description bla bla bla
    .tags new, old, blue, borrowed

            
          
!
            
              @import "compass/css3";

li {
  min-height: 3.3em;
  overflow:hidden; /* or use clearfix hack etc... */
  .name,.description {
    margin:.5em auto .5em 0;
    float:left; /* float to the left */
    width:10em;
  }
  .tags {
    margin-left:10em; /* same with `.name & .description` width */
  }
}



// Styles to make the rest of this look nice
* { @include box-sizing(border-box); }
body { background: #888; color: #EEE; }
.TARGET { outline: 2px dashed rgba(red, 0.5); }
ul {
  width: 20em;
  margin: 1em auto;
  padding: 0;
  list-style-type: none;
  background-color: #333;
}
li {
  padding: 0.5em;
  border-top: 2px dotted #555;
  &:first-child { border-top: none; }
    .description { color: #888; }
}

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console