3 ms·
:has() sounds amazing on the surface. I’d be interested in a good advantages / disadvantages overview if anyone :has() a link. Edit: Useful: https://caniuse.c
by WalterGR 4y ago
:has() sounds amazing on the surface. I’d be interested in a good advantages / disadvantages overview if anyone :has() a link.
Edit: Useful: https://caniuse.com/?search=has https://caniuse.com/?search=has
- clairity 4y agothere are a bunch of good articles out there on :has() now, like this one: https://www.smashingmagazine.com/2021/06/has-native-css-parent-selector/ https://www.smashingmagazine.com/2021/06/has-native-css-pare... i've been experimenting with it on safari tech preview, and it really lets you do many things that were previously impossible or unacceptably brittle. i love it. same with container queries. have been experimenting, it's really nice compared to page grids and breakpoint hell.
- nicoburns 4y agoOhhh, I didn't know that container queries are finally being implemented. I'd given up on them as something that would be great but didn't look like they were going to happen.
- arrakeen 4y agoit's extremely useful for defining ublock origin rules
- WalterGR 4y agoSo far I've only used it in TamperMonkey. Between your comment and culturestate's[0], you may be on to something. [0] https://news.ycombinator.com/item?id=31369223 https://news.ycombinator.com/item?id=31369223