Skip to content

Instantly share code, notes, and snippets.

@2thecrow
Forked from maxdenaro/custom-numeric.css
Created December 18, 2020 12:23
Show Gist options
  • Save 2thecrow/fccfdf5ecc681809c22bcca7a61b11c1 to your computer and use it in GitHub Desktop.
Save 2thecrow/fccfdf5ecc681809c22bcca7a61b11c1 to your computer and use it in GitHub Desktop.
Custom numeric on CSS (counter-reset)
ol {
counter-reset: section;
}
li {
display: inline-block;
padding-left: 10px;
}
li::before {
counter-increment: section;
content: "0"counters(section, ".") ". ";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment