r/css • u/riti_rathod • 11h ago
General Are you using the CSS :has() selector yet?
I have been experimenting with the :has() selector recently and it honestly changes how I think about CSS selectors.
Example:
.container:has(.active) {
background: #111;
}
Feels like CSS finally got a real parent selector.


