Skip to content

Instantly share code, notes, and snippets.

@jeremypage
Created December 12, 2015 10:55
Show Gist options
  • Save jeremypage/9fb3010aba7066155d56 to your computer and use it in GitHub Desktop.
Save jeremypage/9fb3010aba7066155d56 to your computer and use it in GitHub Desktop.
CSS: Ordered list with big red circular numbers. Derived from http://patternlab.io/css/style.css
ol {
list-style: none;
margin: 0;
padding: 0;
counter-reset: big-num;
}
ol li {
counter-increment: big-num;
position: relative;
padding-left: 3.6em;
}
ol li:before {
content: counter(big-num);
background: rgba(255, 0, 0, 1);
color: #fff;
padding: 0 0.5em;
border-radius: 2em;
position: absolute;
top: 0.2em;
left: 0;
font-size: 1.5em;
line-height: 2;
min-width: 1.0em;
text-align: center;
}
ol>li::after {
content: "\00a0";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment