Skip to content

Instantly share code, notes, and snippets.

@szpakoli
Created August 21, 2013 15:50
Show Gist options
  • Save szpakoli/6296264 to your computer and use it in GitHub Desktop.
Save szpakoli/6296264 to your computer and use it in GitHub Desktop.
#test { counter-reset: c; }
#test span { counter-increment: c; }
#test span:before { content: counter(c, decimal-leading-zero); }
ol > li {
position:relative; /* Create a positioning context */
margin:0; /* Give each list item a left margin to make room for the numbers */
padding:30px 0 30px 70px; /* Add some spacing around the content */
list-style:none; /* Disable the normal item numbering */
border-top:1px solid @black-20;
background: @white;
}
ol > li:before {
counter-increment:li; /* Increment the counter by 1 */
content: counter(li, decimal-leading-zero);
position:absolute;
top: 20px;
left:0px;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
/* Some space between the number and the content in browsers that support
generated content but not positioning it (Camino 2 is one example) */
margin-right:30px;
padding:17px 0;
border-top:1px solid @black-20;
color:@blue;
background:url(/images/ol-circle.png) no-repeat 0 0;
font-weight:bold;
font-family: @serif;
text-align:center;
.font-size(19);
width: 55px;
height: 55px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment