2 ms·
You can also build all kinds of toggleable things with hidden <input>s, "+" sibling selectors, and <label>s to activate the inputs. For example, an accordion th
by grishka 5y ago
You can also build all kinds of toggleable things with hidden <input>s, "+" sibling selectors, and <label>s to activate the inputs. For example, an accordion that only has one section expanded at a time can be made with hidden radio buttons next to each item. Or a navigation drawer/sidebar can be made with a hidden checkbox. Any kind of spoiler-style "click to reveal contents" sort of thing can also be made with a hidden checkbox, it's more flexible than <details>.