Created
July 11, 2016 12:45
-
-
Save oliwa/8cc8f9f92a508b623027888768e5ecd2 to your computer and use it in GitHub Desktop.
Custom Counter for Ordered Lists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ol.custom-counter { | |
margin: 1em 0 1em 2em; | |
padding: 0; | |
list-style-type: none; | |
} | |
ol.custom-counter li { | |
position: relative; | |
counter-increment: step-counter; | |
margin-bottom: .5em; | |
} | |
ol.custom-counter li::before { | |
position: absolute; | |
content: counter(step-counter); | |
left: -2.5em; | |
top: 0; | |
font-size: .8em; | |
background-color: #84B962; | |
color: #fff; | |
font-weight: bold; | |
padding: 3px 8px; | |
border-radius: 3px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment