A tutorial on building a drill-down nested menu using HTML `<details>` elements and the CSS `@scope` rule. The technique uses `@scope`'s 'donut' scoping — defining a scope root and scope limit — to hide sibling and parent menu levels when a submenu is open, leaving only the active nested level visible. Includes code examples

4m read timeFrom frontendmasters.com
Post cover image
Table of contents
The Nested LayoutThe Donut Scope
1 Comment

Sort: