CSS :has()
div:has(a)
Lorem ipsum, dolor sit, amet consectetur adipisicing elit.
Lorem ipsum, dolor sit,
amet consectetur
adipisicing elit.
ul:has(li:nth-child(3))
One
Two
One
Two
Three
Four
.foo:has(.bar)
foo
foo
bar
https://developer.mozilla.org/en-US/docs/Web/CSS/:has
caniemail.com
, 2021.