@supportsBaseline · Widely available
The @supports at-rule applies styles based on a browser's support for CSS features, such as a CSS property and value. Also known as feature queries.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 30, 2015. Widely available since Mar 30, 2018.
Browser support
DesktopChrome
1–27Not supported
28+Supportedsince Jul 9, 2013
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–21Not supported
22+Supportedsince Jun 25, 2013
Current: 157Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27MobileChrome Android
18–27Not supported
28+Supportedsince Jul 10, 2013
Current: 155Firefox Android
4–21Not supported
22+Supportedsince Jun 25, 2013
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: supportsText.
Feature detection
JS · check before using
if ("CSSSupportsRule" in globalThis) {
// CSSSupportsRule is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (7). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| CSSImportRule.supportsText | 121 | 121 | 114 | 17.5 | 121 | 114 | 17.5 |
| CSSSupportsRule | 28 | 12 | 22 | 9 | 28 | 22 | 9 |
| @import.supports | 122 | 122 | 115 | 17.5 | 122 | 115 | 17.5 |
| @supports | 28 | 12 | 22 | 9 | 28 | 22 | 9 |
| @supports.font-format | 108 | 108 | 106 | 17 | 108 | 106 | 17 |
| @supports.font-tech | 108 | 108 | 106 | 17 | 108 | 106 | 17 |
| @supports.selector | 83 | 83 | 69 | 14.1 | 83 | 79 | 14.5 |