CSS :has

27 · David Walsh · March 28, 2022, 10:08 a.m.
For as long as developers have written CSS code, we’ve been desperate to have a method to allow styling a parent element based child characteristics. That’s not been possible until now. CSS has introduced the :has pseudo-class which allows styling a parent based on a relative CSS selector! Let’s have a look at a few […] The post CSS :has appeared first on David Walsh Blog. ...