The Drill-Down Menu with Details and @scope
Even if you nest details elements, you can ensure only one level of them is open at a time, making a menu you can drill down (and up!) from.
Even if you nest details elements, you can ensure only one level of them is open at a time, making a menu you can drill down (and up!) from.
You can style anything you want on the entire page when any given details element is open or closed.
Putting a YouTube video inside a closed details element means it won’t load until that details element is opened. We can use that.
If the #hash in the URL matches the ID of an element *inside* a
Accordion details, toggle switches, styleable selects, responsive video, and more!
The HTML for a <details> element is generally something like: See how I put two <p> elements in there? That’s totally fine. Everything that isn’t the <summary> is visually hidden until the <details> is open, either via the open attribute or the summary is clicked/tapped. So if you’re trying to select “all the content”, you’re […]
Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.