This content originally appeared on CSS-Tricks and was authored by Chris Coyier
I just joked that we’re basically getting everything we want in CSS super fast (mostly referring to container queries, my gosh, can you imagine they are actually coming?). Now we might actually get parent selectors?! As in .parent:has(.child) { }
. Traditionally it’s been nope, too slow, browsers can’t do it. Brian Kardell:
Igalia engineers have been looking into this problem. We’ve been having discussions with Chromium developers, looking into Firefox and WebKit codebases and doing some initial protypes and tests to really get our heads around it. Through this, we’ve provided lots of data about performance of what we have already and where we believe challenges and possibilities lie. We’ve begun sketching out an explainer with all of our design notes and questions linked up
Like I said in 2010: Want!
Here’s some other use cases in the blog post and comment section.
Direct Link to Article — Permalink
The post Can I :has() appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
This content originally appeared on CSS-Tricks and was authored by Chris Coyier
Chris Coyier | Sciencx (2021-06-04T14:37:59+00:00) Can I :has(). Retrieved from https://www.scien.cx/2021/06/04/can-i-has/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.