{{APIRef("CSSOM")}}
The CSSSupportsRule
interface describes an object representing a single CSS {{cssxref("@supports")}} at-rule. It implements the {{domxref("CSSConditionRule")}} interface, and therefore the {{domxref("CSSRule")}} and {{domxref("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 {{domxref("CSSConditionRule")}} and therefore a {{domxref("CSSRule")}} and a {{domxref("CSSGroupingRule")}}, CSSSupportsRule
also implements the properties of these interfaces. It has no specific properties.
Methods
As a {{domxref("CSSConditionRule")}} and therefore a {{domxref("CSSRule")}}and a {{domxref("CSSGroupingRule")}}, CSSSupportsRule
also implements the methods of that interface. It has no specific methods.
Specification
Specification | Status | Comment |
---|---|---|
{{ SpecName('CSS3 Conditional', '#the-csssupportsrule-interface', 'CSSSupportsRule') }} | {{ Spec2('CSS3 Conditional') }} | Initial definition |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatGeckoDesktop("17")}}[1] | {{CompatNo}} | 12.10 | {{CompatNo}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatGeckoMobile("17")}}[1] | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
[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.
See also
- {{cssxref("@supports")}}