This collection is a complete guide to styling and extending the functionality of nested lists. It starts with the basics: creating hierarchical numbering (1.1, 1.2.1) with CSS Counters, perfect for documentation. Next, lists are transformed into tree structures by drawing connector lines with pseudo-elements. Finally, interactivity is added by building native accordions with <details>/<summary> or using the “checkbox hack” for smooth, JS-free collapse animations.
3 CSS Nested Lists
Nested List Style
An elegant, modern list of track properties featuring custom graphic icons and smooth micro-interactions like padding shifts and color changes on hover.
See the Pen Nested List Style.
OST Tree
A pure CSS tree diagram constructed from nested lists where pseudo-elements with borders form the connecting branches.
See the Pen OST Tree.
List Styles
An aesthetically pleasing, modern todo list featuring a vibrant gradient theme and an intuitive hierarchy creation function without complex control buttons.
See the Pen List Styles.