gomakethings.com
The :has() CSS pseudo-class
I finally got a chance to work with the :has() CSS pseudo-class as part of Kelp, my UI library for people who love HTML.
Today, I wanted to quickly look at what it is and how it works. Let’s dig in!
If an element has a child or sibling, style the element CSS has long had all sorts of interesting selectors for targeting attributes that start or end with certain letters (^= and $=, respectively), or that have a certain parent/child (.