CSSConditionRule

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

Revision Content

{{ CSSOMRef() }}

{{SeeCompatTable() }}

An object implementing the CSSConditionRule DOM interface represents a single condition CSS at-rule, which consists of a condition and a statement block.

Two objects derives from it : {{domxref("CSSMediaRule")}} and {{domxref("CSSSupportsRule")}}.

Properties common to all CSSConditionRule instances

The CSSConditionRule derives from {{domxref("CSSRule")}}, {{domxref("CSSGroupingRule")}} and inherits all properties of these classes. It has one specific property:

conditionText
Represents the text of the condition of the rule.

Methods common to all CSSConditionRule instances

The CSSConditionRule derives from {{domxref("CSSRule")}}, {{domxref("CSSGroupingRule")}} and inherits all methods of these classes. It has no specific property of its own.

Specification

Specification Status Comment
{{ SpecName('CSS3 Conditional', '#the-cssconditionrule-interface', 'CSSConditionRule') }} {{ Spec2('CSS3 Conditional') }} Initial definition.

Browser compatibility

To get browser compatibility information about the different type constant value, please consult the compatibility table of the associated interface.

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatNo() }} {{ CompatGeckoDesktop("20.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatGeckoMobile("20.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

See also

Revision Source

<p>{{ CSSOMRef() }}</p>
<p>{{SeeCompatTable() }}</p>
<p>An object implementing the <code>CSSConditionRule</code> DOM interface represents a single condition CSS at-rule, which consists of a condition and a statement block.</p>
<p>Two objects derives from it : {{domxref("CSSMediaRule")}} and {{domxref("CSSSupportsRule")}}.</p>
<h2 id="Properties_common_to_all_CSSConditionRule_instances">Properties common to all CSSConditionRule instances</h2>
<p>The <code>CSSConditionRule</code> derives from {{domxref("CSSRule")}}, {{domxref("CSSGroupingRule")}} and inherits all properties of these classes. It has one specific property:</p>
<dl>
  <dt>
    <code>conditionText</code></dt>
  <dd>
    Represents the text of the condition of the rule.</dd>
</dl>
<h2 id="Methods_common_to_all_CSSConditionRule_instances">Methods common to all CSSConditionRule instances</h2>
<p>The <code>CSSConditionRule</code> derives from {{domxref("CSSRule")}}, {{domxref("CSSGroupingRule")}} and inherits all methods of these classes. It has no specific property of its own.</p>
<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-cssconditionrule-interface', 'CSSConditionRule') }}</td>
      <td>{{ Spec2('CSS3 Conditional') }}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>To get browser compatibility information about the different type constant value, please consult the compatibility table of the associated interface.</p>
<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("20.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</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("20.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en/DOM/Using_dynamic_styling_information" title="en/DOM/Using_dynamic_styling_information">Using dynamic styling information</a></li>
  <li>{{domxref("CSSRule")}}, {{domxref("CSSSupportsRule")}}, {{domxref("CSSMediaRule")}}.</li>
</ul>
Revert to this revision