{{ 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
- Using dynamic styling information
- {{CSSOM}}