:has()
Newly available since 2023-12-19
The :has()
CSS functional pseudo-class matches an element if any of the selectors passed as parameters would match at least one element.
Learning resources on MDN
Browser support (view on caniuse.com)
- Chrome 105 Released on 2022-09-02
- Chrome Android 105 Released on 2022-09-02
- Edge 105 Released on 2022-09-01
- Firefox 121 Released on 2023-12-19
- Firefox for Android 121 Released on 2023-12-19
- Safari 15.4 Released on 2022-03-14
- Safari on iOS 15.4 Released on 2022-03-14
Surveys
- State of HTML 2023: usage/html_interoperability_features question
- State of CSS 2024: usage/favorite_new_features question
- State of CSS 2024: usage/css_missing_features question
- State of CSS 2024: usage/css_interoperability_features question
- State of CSS 2024: features/all_features question
Specifications
View web-platform-tests results for this feature - View the feature source file (dist) - Edit the feature - Report an issue about this feature