CSS.supports()Baseline · Widely available
The CSS.supports() static method returns whether the browser supports a CSS declaration (given by two arguments, a property and value) or an @supports at-rule condition string.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.
Browser support
DesktopChrome
1–60Not supported
61+Supportedsince Sep 5, 2017
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–54Not supported
55+Supportedsince Aug 8, 2017
Current: 157Safari
1–10.1Not supported
11+Supportedsince Sep 19, 2017
Current: 27MobileChrome Android
18–60Not supported
61+Supportedsince Sep 5, 2017
Current: 155Firefox Android
4–54Not supported
55+Supportedsince Aug 8, 2017
Current: 157Safari iOS
1–10.3Not supported
11+Supportedsince Sep 19, 2017
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: supports static.
Feature detection
JS · check before using
if ("CSS" in globalThis && "supports" in CSS) {
// CSS.supports is available
}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 |
|---|---|---|---|---|---|---|---|
| CSS.supports_static | 28 | 12 | 22 | 9 | 28 | 22 | 9 |
| CSS.supports_static.optional_parens | 61 | 79 | 55 | 11 | 61 | 55 | 11 |