Interface CSSGroupingRule

All Superinterfaces:
CSSRule, CSSRule
All Known Subinterfaces:
CSSConditionRule, CSSMediaRule, CSSSupportsRule
All Known Implementing Classes:
GroupingRule, MediaRule, SupportsRule

public interface CSSGroupingRule extends CSSRule
Represents an at-rule that contains other rules nested inside itself.
  • Method Details

    • getCssRules

      CSSRuleList<? extends CSSRule> getCssRules()
      Get the list of CSS rules nested inside the grouping rule.
      a CSSRuleList object for the list of CSS rules nested inside the grouping rule.
    • insertRule

      int insertRule(String rule, int index) throws DOMException
      Inserts a new rule into this grouping rule collection.
      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.
      the index at which the rule was inserted.
      DOMException - if the index is out of bounds or there was a problem parsing the rule.
    • deleteRule

      void deleteRule(int index) throws DOMException
      Removes a CSS rule from the CSS rule list returned by getCssRules() at index.
      index - the rule list index at which the rule must be removed.
      DOMException - INDEX_SIZE_ERR if index is greater than or equal to getCssRules().getLength().