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 534233 of CSSGroupingRule

  • Revision slug: Web/API/CSSGroupingRule
  • Revision title: CSSGroupingRule
  • Revision id: 534233
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ APIRef() }}

An object implementing the CSSGroupingRule interface represents any CSS at-rule that contains other rules nested in it.

Objects deriving from it : {{domxref("CSSConditionRule")}} and its children: {{domxref("CSSMediaRule")}}, {{domxref("CSSSupportsRule")}}, and {{domxref("CSSDocumentRule")}}.

Syntax

The syntax is described using the WebIDL format.

interface CSSGroupingRule : CSSRule {
    readonly attribute CSSRuleList cssRules;
    unsigned long insertRule (DOMString rule, unsigned long index);
    void deleteRule (unsigned long index);
}

Properties common to all CSSGroupingRule instances

The CSSGroupingRule derives from {{domxref("CSSRule")}} and inherits all properties of this class. It has one specific property:

{{domxref("CSSGroupingRule.cssRules")}} {{readonlyinline}}
Returns a {{domxref("CSSRuleList")}} of the CSS rules in the media rule.

Methods common to all CSSGroupingRule instances

The CSSGroupingRule derives from {{domxref("CSSRule")}} and inherits all methods of this class. It has two specific methods:

{{domxref("CSSGroupingRule.deleteRule")}}
Deletes a rule from the style sheet.
{{domxref("CSSGroupingRule.insertRule")}}
Inserts a new style rule into the current style sheet.

Specification

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

Browser compatibility

{{ 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>{{ APIRef() }}</p>
<p>An object implementing the <strong><code>CSSGroupingRule</code></strong> interface represents any CSS at-rule that contains other rules nested in it.</p>
<p>Objects deriving from it : {{domxref("CSSConditionRule")}} and its children: {{domxref("CSSMediaRule")}}, {{domxref("CSSSupportsRule")}}, and {{domxref("CSSDocumentRule")}}.</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 CSSGroupingRule : CSSRule {
    readonly attribute CSSRuleList cssRules;
    unsigned long insertRule (DOMString rule, unsigned long index);
    void deleteRule (unsigned long index);
}
</pre>
<h2 id="Properties_common_to_all_CSSGroupingRule_instances">Properties common to all CSSGroupingRule instances</h2>
<p>The <code>CSSGroupingRule</code> derives from {{domxref("CSSRule")}} and inherits all properties of this class. It has one specific property:</p>
<dl>
 <dt id="cssRules">
  {{domxref("CSSGroupingRule.cssRules")}} {{readonlyinline}}</dt>
 <dd>
  Returns a {{domxref("CSSRuleList")}} of the CSS rules in the media rule.</dd>
</dl>
<h2 id="Methods_common_to_all_CSSGroupingRule_instances">Methods common to all CSSGroupingRule instances</h2>
<p>The <code>CSSGroupingRule</code> derives from {{domxref("CSSRule")}} and inherits all methods of this class. It has two specific methods:</p>
<dl>
 <dt id="deleteRule">
  {{domxref("CSSGroupingRule.deleteRule")}}</dt>
 <dd>
  Deletes a rule from the style sheet.</dd>
 <dt id="insertRule">
  {{domxref("CSSGroupingRule.insertRule")}}</dt>
 <dd>
  Inserts a new style rule into the current style sheet.</dd>
</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-cssgroupingrule-interface', 'CSSGroupingRule') }}</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("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>{{CSSOM}}</li>
</ul>
Revert to this revision