The Undeniable Utility Of CSS :has

September 11, 2024

Well, I’ve spent the past few months rebuilding this blog, using all of the modern CSS bells and whistles. And my goodness, I was wrong about :has. It’s an incredibly handy utility, even in a CSS-in-JS context!In this blog post, I’ll introduce you to :has and share some of the most interesting real-world use cases I’ve found so far, along with some truly mindblowing experiments.

Source: The Undeniable Utility Of CSS :has • Josh W. Comeau

The :has selector is having a moment, with a second article after Nadia Makarevich’s recent article.