Pen Settings

HTML

CSS

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

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

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.

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

              
                h1 Custom styling ordered lists

section
  h2 No CSS
  ol
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Element padded
  ol.oldschool
    li
      span This is the first item
    li
      span This is the second item
    li
      span This is the third item
 
section
  h2 Using Counter
  ol.counter
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Using Counter and transitions
  ol.counter.animated
    li This is the first item
    li This is the second item
    li This is the third item
 
section
  h2 Zero padded
  ol.counter.zeropadded
    li This is the first item
    li This is the second item
    li This is the third item
 
section
  h2 Lower Roman
  ol.counter.lower-roman
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Upper Roman
  ol.counter.upper-roman
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Georgian
  ol.counter.georgian
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Armenian
  ol.counter.armenian
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Lower Latin
  ol.counter.lower-latin
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Upper Latin
  ol.counter.upper-latin
    li This is the first item
    li This is the second item
    li This is the third item

section
  h2 Lower Greek
  ol.counter.lower-greek
    li This is the first item
    li This is the second item
    li This is the third item

              
            
!

CSS

              
                body {
  font-family: helvetica, arial, sans-serif;
  color: #f8f8f8;
  background: #1a1a1a;
}
h1, h2 {
  font-weight: lighter;
}
section {
  width: 45%;
  float: left;
  padding: 5px;
}
.oldschool {
  li {
    color: green;
  }
  span {
    color: lime;
  }
}
.counter {
  counter-reset: list;
  li {
    list-style: none;
    position: relative;
    color: lime;
    &:before {
      counter-increment: list;
      content: counter(list) '.';
      position: absolute;
      top: 0px;
      left: -1.2em;
      color: green;
    }
  }
}
.animated {
  li:before {
    transition: 0.5s;
    color: green;
  }
  li:hover:before {
    color: white;
    transform: scale(1.5);
  }
}
.zeropadded {
  li:before {
    content: counter(list,decimal-leading-zero) '.';
    left: -2em;
  }
}
.lower-roman {
  li::before {
    content: counter(list,lower-roman) '.';
    left: -2em;
  }
  li:before {
    content: counter(list,upper-roman) '.';
    left: -2em;
  }
}
.georgian {
  li:before {
    content: counter(list,georgian) '.';
    left: -2em;
  }
}
.armenian {
  li:before {
    content: counter(list,armenian) '.';
    left: -2em;
  }
}
.lower-latin {
  li:before {
    content: counter(list,lower-latin) '.';
    left: -2em;
  }
}
.upper-latin {
  li:before {
    content: counter(list,upper-latin) '.';
    left: -2em;
  }
}
.lower-greek {
  li:before {
    content: counter(list,lower-greek) '.';
    left: -2em;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console