:focus-within CSS pseudo-class

:focus-within CSS pseudo-class

The :focus-within pseudo-class matches elements that either themselves match :focus or that have descendants which match :focus.

Spec https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo
Status Unofficial / Note
IE Edge Firefox Chrome Safari Opera