3 ms·
Awesome list! The '<ol> tip reminds me that I wish there was a better way to do nested list numbering of the kind you'd likely find in a table of contents, such
by livinginfear 5y ago
Awesome list! The '<ol> tip reminds me that I wish there was a better way to do nested list numbering of the kind you'd likely find in a table of contents, such as "1.1.2" and so on. As far as I'm aware there's no simple way to do this natively without using CSS or JS to change the list item prefix.
- marcosdumay 5y agoHum... Are you referring to the numbers that appear when you nest lists? As in putting an ol inside an item of another ol?
- livinginfear 5y agoYes. Nesting <ol> elements alone does not yield the kind of results I'm after.
- extra88 5y agoYou can do that with CSS alone. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_a...
- livinginfear 5y agoI'm familiar with that trick. This is the CSS solution I was referring to above. I still consider this quite 'hacky', and non-intuitive.