Skip to content

Instantly share code, notes, and snippets.

@lilumi
Created February 15, 2020 19:02
Show Gist options
  • Save lilumi/f284e374c299e4f620b1d066fc0b560a to your computer and use it in GitHub Desktop.
Save lilumi/f284e374c299e4f620b1d066fc0b560a to your computer and use it in GitHub Desktop.
Colored Ul & OL
ul, ol {
margin: 0 0 32px 0; /* same as for P */
padding: 0 0 0 1.2em;
}
ul {
list-style: none;
}
ol {
list-style: none;
counter-reset: li;
padding-left: 2.7em; /* to align multiline text*/
}
ol>li::before {
content: counter(li, decimal)".";
color: #59E3BC;
display: inline-block;
width: 1.2em;
margin-left: -1.2em;
}
ol>li {
counter-increment: li;
position: relative;
margin-bottom: 16px;
}
li > ul,
li > ol {
margin-bottom: 0;
margin-left: 0;
}
.row-wrapper ul>li {
padding-left: 1.2em;
text-indent: 0;
position: relative;
margin-bottom: 16px;
}
.row-wrapper ul>li:before {
content: "\002022";
color: #59E3BC;
position: absolute;
left: 0;
top: 4px;
font-weight: 800;
display: block;
font-family: Arial, sans-serif;
font-size: 1.4rem;
}
ol>li * {
margin-bottom: 0;
display: inline-block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment