:not()Baseline · Widely available
The :not() functional pseudo-class matches elements that do not match the selectors in its argument.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 21, 2021. Widely available since Jul 21, 2023.
Browser support
DesktopChrome
1–87Not supported
88+Supportedsince Jan 19, 2021
Current: 155Edge
12–87Not supported
88+Supportedsince Jan 21, 2021
Current: 154Firefox
1–83Not supported
84+Supportedsince Dec 15, 2020
Current: 157Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27MobileChrome Android
18–87Not supported
88+Supportedsince Jan 19, 2021
Current: 155Firefox Android
4–83Not supported
84+Supportedsince Dec 15, 2020
Current: 157Safari iOS
1–8Not supported
9+Supportedsince Sep 16, 2015
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: :not.
Feature detection
CSS · check before using
@supports selector(:not(*)) {
/* styles that use :not(*) */
}
/* or in JavaScript */
if (CSS.supports("selector(:not(*))")) {
// use it
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| not | 1 | 12 | 1 | 3.1 | 18 | 4 | 2 |
| not.selector_list | 88 | 88 | 84 | 9 | 88 | 84 | 9 |