Skip to content

Instantly share code, notes, and snippets.

@gmutschler
Created August 13, 2014 16:24
Show Gist options
  • Save gmutschler/9c7767b8ae67b438628b to your computer and use it in GitHub Desktop.
Save gmutschler/9c7767b8ae67b438628b to your computer and use it in GitHub Desktop.
Color the bullets and numbers of lists
ul, ol {
counter-reset: the_counter;
list-style: none;
padding:0;
margin:0;
}
li {
line-height: 1.8em;
letter-spacing: -0.005em;
font-size: 0.95em;
padding-left: 1.9em;
}
ul li:before {
content: "• ";
color: red;
margin-left: -1.4em;
margin-right: 1.4em;
font-size: 1.1em;
line-height: 1.6em;
vertical-align: middle;
}
ol li:before {
content: counter(the_counter)'.';
counter-increment: the_counter;
color: red;
margin-left: -3.4em;
margin-right: 1.4em;
width: 3em;
vertical-align: middle;
display: inline-block;
text-align: right;
}
ul, ol {
counter-reset: the_counter;
list-style: none;
padding:0;
margin:0;
li {
line-height: 1.8em;
letter-spacing: -0.005em;
font-size: 0.95em;
padding-left: 1.9em;
}
}
ul li:before {
content: "• ";
color: red;
margin-left: -1.4em;
margin-right: 1.4em;
font-size: 1.1em;
line-height: 1.6em;
vertical-align: middle;
}
ol li:before {
content: counter(the_counter)'.';
counter-increment: the_counter;
color: red;
margin-left: -3.4em;
margin-right: 1.4em;
width: 3em;
vertical-align: middle;
display: inline-block;
text-align: right;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment