FYI You can nest <details> tags within <ul> and vice versa to create a collapsible tree menu without JS or CSS

E.G.
<details>
<summary>Root</summary>
<ul>
<li>
<details>
<summary>Sub</summary>
<ul><li>etc...</li></ul>
</details>
</li>
</ul>
</details>

Follow

@dredmorbius For a little bit. It's part of the HTML5 spec now and most browsers, including mobiles support it

developer.mozilla.org/en-US/do

I'm using it to write a little editor plugin for my blog (also because I'm extremely lazy :P)

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!