Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 337381 of CSSSupportsRule

  • Revision slug: DOM/CSSSupportsRule
  • Revision title: CSSSupportsRule
  • Revision id: 337381
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSOMRef() }}

{{ SeeCompatTable() }}

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][2] {{ CompatNo() }} 12.10 {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatGeckoMobile("17") }} [1][2] {{ 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.

[2] 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

  • {{CSSOM}}
  • {{ cssxref("@supports") }}

Revision Source

<p>{{ CSSOMRef() }}</p>
<p>{{ SeeCompatTable() }}</p>
<p>The <strong><code>CSSSupportsRule</code></strong> interface describes an object representing a single CSS {{ cssxref("@supports") }} <a href="/en-US/docs/CSS/At-rule" title="/en-US/docs/CSS/At-rule">at-rule</a>. It implements the {{ domxref("CSSConditionRule") }} interface, and therefore the {{domxref("CSSRule")}} and {{domxref("CSSGroupingRule")}} interfaces with a type value of <code>12</code> (<code>CSSRule.SUPPORTS_RULE</code>).</p>
<h2 id="Properties" name="Properties">Syntax</h2>
<p>The syntax is described using the <a href="https://dev.w3.org/2006/webapi/WebIDL/" title="https://dev.w3.org/2006/webapi/WebIDL/">WebIDL</a> format.</p>
<pre>
interface CSSSupportsRule : CSSConditionRule {
}
</pre>
<h2 id="Properties" name="Properties">Properties</h2>
<p>As a {{ domxref("CSSConditionRule") }} and therefore a {{ domxref("CSSRule") }} and a {{domxref("CSSGroupingRule")}}, <code>CSSSupportsRule</code> also implements the properties of these interfaces. It has no specific properties.</p>
<h2 id="Methods" name="Methods">Methods</h2>
<p>As a {{ domxref("CSSConditionRule") }} and therefore a {{ domxref("CSSRule") }}and a {{domxref("CSSGroupingRule")}}, <code>CSSSupportsRule</code> also implements the methods of that interface. It has no specific methods.</p>
<dl>
</dl>
<h2 id="Specification" name="Specification">Specification</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('CSS3 Conditional', '#the-csssupportsrule-interface', 'CSSSupportsRule') }}</td>
      <td>{{ Spec2('CSS3 Conditional') }}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoDesktop("17") }} [1][2]</td>
        <td>{{ CompatNo() }}</td>
        <td>12.10</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoMobile("17") }} [1][2]</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<p>[1] As prefixing this at-rule has no sense, the <code>CSSSupportsRule</code> is only supported if the user enables it by setting the config value <code>layout.css.supports-rule.enable</code> to true.</p>
<p>[2] From Firefox 17 to Firefox 19 included, <code>CSSSupportsRule</code> derived directly from <code>CSSRule</code> and the methods and properties now defined at the <code>CSSConditionRule</code> level where defined in <code>CSSSupportsRule</code>. The draft specification changed and Firefox 20 was updated.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{CSSOM}}</li>
  <li>{{ cssxref("@supports") }}</li>
</ul>
Revert to this revision