Easy-Table-of-Contents
Easy-Table-of-Contents copied to clipboard
Add `ez-toc-list` class to all lists
While first-level lists include a generic .ez-toc-list
HTML class in addition to .ez-toc-list-level-1
, nested lists only have a variable class name including the nesting level.
So if you want to apply styles to all lists regardless of their nesting level, you either have to use the tag selector (e.g. #ez-toc-container ul
, which some might consider bad practice) or use an unnecessarily inconvenient attribute selector ([class^="ez-toc-list"]
).
By adding a generic .ez-toc-list
class to all lists, none of the "workarounds" would be necessary.