CSS :has() Interactive Guide

February 27, 2024

We always wanted a way in CSS to style an element based on its descendants. It wasn’t possible until CSS :has() became supported in all major browsers.

In this article, I will explore the problem and shed the light on some of the interesting use cases for CSS :has().

Source: CSS :has() Interactive Guide

The always excellent Ahmad Shaheed on the longest awaited CSS selector-the :has selector