Web platform features explorer

:focus-within

Widely available since 2022-07-15
Tags: css Groups: CSS > Selectors

The :focus-within CSS pseudo-class matches an element if the element or any of its children are focused.

Learn more

Browser support (view on caniuse.com)

  • Chrome 60 Released on 2017-07-25
  • Chrome Android 60 Released on 2017-08-01
  • Edge 79 Released on 2020-01-15
  • Firefox 52 Released on 2017-03-07
  • Firefox for Android 52 Released on 2017-03-07
  • Safari 10.1 Released on 2017-03-27
  • Safari on iOS 10.3 Released on 2017-03-27