Created
June 26, 2013 05:33
-
-
Save teddyzetterlund/5865005 to your computer and use it in GitHub Desktop.
Automatic figure numbering with CSS counters
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
article { | |
counter-reset: figures; | |
} | |
figure { | |
counter-increment: figures; | |
} | |
figcaption:before { | |
content: "Fig. " counter(figures) " - "; /* For I18n support; use data-counter-string. */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment