Created
August 20, 2016 09:48
-
-
Save tohuw/645ed204feac1e74f8205919e1ad97ec to your computer and use it in GitHub Desktop.
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
// A demonstration of how to write SASS styling for multi-level lists | |
// List types vary per level, and list counters are styleable | |
// Owes greatly to this: http://stackoverflow.com/a/15253672/316733 | |
ol { | |
counter-reset: li; | |
margin-left: .5em; | |
li { | |
counter-increment: li; | |
list-style-type: none; | |
&::before { | |
color: gray; | |
content: counter(li) '.'; | |
margin-right: .33em; | |
} | |
} | |
ol { | |
li::before { content: counter(li, upper-alpha) '.'; } | |
ol li::before { content: counter(li, lower-roman) '.'; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment