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 CSSRule
and 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
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | No support | (Yes) | 17 (17)[1] | No support | 12.10 | No support |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | No support | (Yes) | 17.0 (17)[1] | No support | No support | No support |
[1] As prefixing this at-rule has no sense, the CSSSupportsRule
is only supported if the user enables it by setting the config value layout.css.supports-rule.enable
to true.
From Firefox 17 to Firefox 19 included, CSSSupportsRule
derived directly from CSSRule
and the methods and properties now defined at the CSSConditionRule
level where defined in CSSSupportsRule
. The draft specification changed and Firefox 20 was updated.