Created
October 11, 2015 06:13
-
-
Save justinhough/afd3cb39184dc0c1a41e to your computer and use it in GitHub Desktop.
Counter Increment
This file contains hidden or 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 way to number sections and sub-sections with "Section 1", "1.1", "1.2", etc.: | |
| body { | |
| counter-reset:section; | |
| } | |
| h1 { | |
| counter-reset:subsection; | |
| } | |
| h1:before { | |
| counter-increment:section; | |
| content:"Section " counter(section) ". "; | |
| } | |
| h2:before { | |
| counter-increment:subsection; | |
| content:counter(section) "." counter(subsection) " "; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment