- All Known Subinterfaces:
- CSSConditionRule,- CSSContainerRule,- CSSLayerBlockRule,- CSSStyleRule,- CSSSupportsRule
Represents an at-rule that contains other rules nested inside itself.
- 
Field SummaryFields inherited from interface org.w3c.css.om.CSSRuleCOUNTER_STYLE_RULE, CUSTOM_MEDIA_RULE, DOCUMENT_RULE, FONT_FACE_RULE, FONT_FEATURE_VALUES_RULE, IMPORT_RULE, KEYFRAME_RULE, KEYFRAMES_RULE, MARGIN_RULE, MEDIA_RULE, NAMESPACE_RULE, NESTED_DECLARATIONS, PAGE_RULE, PROPERTY_RULE, REGION_STYLE_RULE, STYLE_RULE, SUPPORTS_RULE, UNKNOWN_RULE, VIEWPORT_RULEFields inherited from interface org.w3c.dom.css.CSSRuleCHARSET_RULE
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeleteRule(int index) Removes a CSS rule from the CSS rule list returned bygetCssRules()atindex.Get the list of CSS rules nested inside the grouping rule.intinsertRule(String rule, int index) Inserts a new rule into this grouping rule collection.Methods inherited from interface org.w3c.css.om.CSSRulegetParentRule, getParentStyleSheetMethods inherited from interface org.w3c.dom.css.CSSRulegetCssText, getType, setCssText
- 
Method Details- 
getCssRulesCSSRuleList getCssRules()Get the list of CSS rules nested inside the grouping rule.- Returns:
- a CSSRuleList object for the list of CSS rules nested inside the grouping rule.
 
- 
insertRuleInserts a new rule into this grouping rule collection.- Parameters:
- rule- The parsable text representing the rule.
- index- The index within the collection of the rule before which to insert the specified rule. If the specified index is equal to the length of the rule collection, the rule will be added to its end.
- Returns:
- the index at which the rule was inserted.
- Throws:
- DOMException- if the index is out of bounds or there was a problem parsing the rule.
 
- 
deleteRuleRemoves a CSS rule from the CSS rule list returned bygetCssRules()atindex.- Parameters:
- index- the rule list index at which the rule must be removed.
- Throws:
- DOMException- INDEX_SIZE_ERR if- indexis greater than or equal to- getCssRules().getLength().
 
 
-