Skip to content

Instantly share code, notes, and snippets.

@aleksmiller
Created August 7, 2014 16:44
Show Gist options
  • Save aleksmiller/8a7a6cbdfb5b7286add5 to your computer and use it in GitHub Desktop.
Save aleksmiller/8a7a6cbdfb5b7286add5 to your computer and use it in GitHub Desktop.
/*
Example:
1. Item lev. 1
1. 1. Item lev. 2
1. 2. Item lev. 2
2. Item lev. 1
2. 1. Item lev. 2
2. 2. Item lev. 2
*/
ol {margin: 0;padding: 0;list-style-position: inside;}
ol li {counter-increment: root;}
ol li ol {counter-reset: subsection;list-style-type: none;}
ol li ol li {counter-increment: subsection;}
ol li ol li:before {content: counter(root) ". " counter(subsection) ". ";}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment