Can I :has()

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) {


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

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 ArticlePermalink


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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Can I :has()." Chris Coyier | Sciencx - Friday June 4, 2021, https://www.scien.cx/2021/06/04/can-i-has/
HARVARD
Chris Coyier | Sciencx Friday June 4, 2021 » Can I :has()., viewed ,<https://www.scien.cx/2021/06/04/can-i-has/>
VANCOUVER
Chris Coyier | Sciencx - » Can I :has(). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/06/04/can-i-has/
CHICAGO
" » Can I :has()." Chris Coyier | Sciencx - Accessed . https://www.scien.cx/2021/06/04/can-i-has/
IEEE
" » Can I :has()." Chris Coyier | Sciencx [Online]. Available: https://www.scien.cx/2021/06/04/can-i-has/. [Accessed: ]
rf:citation
» Can I :has() | Chris Coyier | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.