The CSSSupportsRule interface describes an object representing a single CSS @supports at-rule. It implements the CSSConditionRule interface, and therefore the CSSRule and CSSGroupingRule interfaces with a type value of 12 (CSSRule.SUPPORTS_RULE).

Syntax

The syntax is described using the WebIDL format.

interface CSSSupportsRule : CSSConditionRule {
}

Properties

As a CSSConditionRule and therefore a CSSRule and a CSSGroupingRule, CSSSupportsRule also implements the properties of these interfaces. It has no specific properties.

Methods

As a CSSConditionRule and therefore a CSSRuleand a CSSGroupingRule, CSSSupportsRule also implements the methods of that interface. It has no specific methods.

Specification

Specification Status Comment
CSS Conditional Rules Module Level 3
The definition of 'CSSSupportsRule' in that specification.
Candidate Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome No support NoEdge Full support YesFirefox Full support 17
Notes Disabled
Full support 17
Notes Disabled
Notes From Firefox 17 to 19, methods and properties were defined on CSSSupportsRule. From version 20, they were on CSSConditionRule.
Disabled From version 17: this feature is behind the layout.css.supports-rule.enable preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 12.1Safari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile Full support YesFirefox Android Full support 17
Notes Disabled
Full support 17
Notes Disabled
Notes From Firefox 17 to 19, methods and properties were defined on CSSSupportsRule. From version 20, they were on CSSConditionRule.
Disabled From version 17: this feature is behind the layout.css.supports-rule.enable preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also

Document Tags and Contributors

Contributors to this page: fscholz, mfluehr, erikadoyle, Sebastianz, teoli, kscarfone, Sheppy, webinista
Last updated by: fscholz,