Skip to content

Instantly share code, notes, and snippets.

@EliJDonahue
Created November 28, 2016 20:33
Show Gist options
  • Save EliJDonahue/01334c5563355374c9ba4c3d81d3ae39 to your computer and use it in GitHub Desktop.
Save EliJDonahue/01334c5563355374c9ba4c3d81d3ae39 to your computer and use it in GitHub Desktop.
Use CSS counters to auto-number Aras Tech Doc sections
/* Set a CSS counter using counter-reset (starts at 0) */
body {
counter-reset: sectionNum;
}
/* Increment sectionNum counter at each .Section element */
.Section {
counter-increment: sectionNum;
}
/* Display sectionNum value before each Section Title */
.Section>.Title::before {
content: counter(sectionNum, upper-alpha) ". ";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment