Skip to content

Instantly share code, notes, and snippets.

@velosipedist
Last active December 27, 2015 20:29
Show Gist options
  • Save velosipedist/7385135 to your computer and use it in GitHub Desktop.
Save velosipedist/7385135 to your computer and use it in GitHub Desktop.
HTML Ordered lists custom marker using CSS and `:before` pseudo-class
ol {
counter-reset: custom-counter-name; // any name, use afterwards for incrementing counter
// counter-reset: custom-counter-name 1; // can be started from custom index
li{
list-style:none;
counter-increment: custom-counter-name;
}
li:before {
content: "[" counter(custom-counter-name) "]";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment