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.
There is a way to declare a scope on a specific selector, a specific selector *down to* another selector, or with no selector at all (which scopes to its parent in the DOM).
We’ve got @scope in CSS now, and it’s got it’s uses. But the concept of scope in CSS is a wider idea.
There is an already-classic @scope demo about theme colors. Let’s recap that and then I’ll show how it relates to any situation with modifier classes. (The @scope rule is a newish feature in CSS that is everywhere-but-Firefox, but is in Interop 2025, so shouldn’t be too long to be decently usable.) There are lots of […]
There is an entirely web-platform way of injecting scoped CSS styles into the DOM. It’s requires zero tooling. Will we see it being used more, once Firebox support is there?
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.