3 ms·
I am supportive of this. Ofc, parent selector would still be nice, but I understand the problems solving that performantly. As a highlight, Nested CSS doesn't
by mkhalil 4y ago
I am supportive of this. Ofc, parent selector would still be nice, but I understand the problems solving that performantly.
As a highlight, Nested CSS doesn't support nested selectors if they both begin with letters, so the "&" is used as divider.
I highly recommend web-dev's check out the last section of the article*: https://webkit.org/blog/13813/try-css-nesting-today-in-safari-technology-preview/#:~:text=But%20what%20if%20you%20have%20this%20unnested%20code%3F https://webkit.org/blog/13813/try-css-nesting-today-in-safar...
[*: even though, IMO, in this instance it seems like a hack; nesting CSS styles, while the HTML is nested in the opposite direction seems pretty counterintuitive. but having the tool in your toolbox could be useful for other things.]
- frosted-flakes 4y agoWe have a parent selector. It's called :has(), and Firefox is the only holdout at this point.
- toastal 4y agoYou can enable it with a flag in Firefox though. If only I could enable subgrid with a Blink flag though ha.
- Sesse__ 4y agoThe flag you're looking for is --enable-blink-features=LayoutNGSubgrid, I assume.
- frosted-flakes 4y agoYou can enable :has in Firefox, but it's buggy and still very experimental at this point. Or at least it was a month or so ago.
- romellem 4y agoDo you know about the `:has()` pseudo-selector? It is basically a parent selector, and has decent browser support already! * https://developer.mozilla.org/en-US/docs/Web/CSS/:has https://developer.mozilla.org/en-US/docs/Web/CSS/:has