79521614

Date: 2025-03-19 23:58:18
Score: 1
Natty:
Report link

You can now use the :has() pseudo-class to achieve this.

.wrapper:has(.child2) {
  color: red;
}

Refer to https://caniuse.com/css-has to check if your target browser supports it.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: lost-and-found