:has()
The :has() CSS functional pseudo-class matches an element if any of the selectors passed as parameters would match at least one element.
Status
Baseline Newly Available (since 2023-12-19)
This feature is expected to reach Baseline Widely Available status on: 2026-06-19
MDN documentation
Specifications
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 2025 > usage > html interoperability features features only
- State of HTML 2024 > usage > html interoperability features
- State of HTML 2023 > usage > html interoperability features
- State of CSS 2025 > usage > gamechanger feature
- State of CSS 2025 > usage > favorite new features
- State of CSS 2025 > usage > css missing features
- State of CSS 2025 > usage > css interoperability features
- State of CSS 2025 > usage > css general pain points
- State of CSS 2025 > typography > typography pain points
- State of CSS 2025 > shapes graphics > shapes graphics pain points
- State of CSS 2025 > other features > other features pain points
- State of CSS 2025 > math features > math features pain points
- State of CSS 2025 > layout > layout pain points
- State of CSS 2025 > interactions > interactions pain points
- State of CSS 2025 > features > all features
- State of CSS 2025 > colors > colors pain points
- State of CSS 2024 > usage > favorite new features
- State of CSS 2024 > usage > css pain points
- State of CSS 2024 > usage > css missing features
- State of CSS 2024 > usage > css interoperability features
- State of CSS 2024 > features > all features
Usage (according to Chrome Platform Status)
~45.763% of page loads. More data at chromestatus.com.Interop
- Included in Interop 2023
Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist