- All Superinterfaces:
CSSRule
,ExtendedCSSRule
- All Known Subinterfaces:
CSSConditionRule
,CSSSupportsRule
,ExtendedCSSMediaRule
- All Known Implementing Classes:
GroupingRule
,MediaRule
,SupportsRule
Represents an at-rule that contains other rules nested inside itself.
-
Field Summary
Fields inherited from interface org.w3c.dom.css.CSSRule
CHARSET_RULE, FONT_FACE_RULE, IMPORT_RULE, MEDIA_RULE, PAGE_RULE, STYLE_RULE, UNKNOWN_RULE
Fields inherited from interface io.sf.carte.doc.style.css.ExtendedCSSRule
COUNTER_STYLE_RULE, CUSTOM_MEDIA_RULE, DOCUMENT_RULE, FONT_FEATURE_VALUES_RULE, KEYFRAME_RULE, KEYFRAMES_RULE, MARGIN_RULE, NAMESPACE_RULE, REGION_STYLE_RULE, SUPPORTS_RULE, VIEWPORT_RULE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteRule
(int index) Removes a CSS rule from the CSS rule list returned bygetCssRules()
atindex
.ExtendedCSSRuleList<? extends ExtendedCSSRule>
Get the list of CSS rules nested inside the grouping rule.int
insertRule
(String rule, int index) Inserts a new rule into this grouping rule collection.Methods inherited from interface org.w3c.dom.css.CSSRule
getCssText, getType, setCssText
Methods inherited from interface io.sf.carte.doc.style.css.ExtendedCSSRule
clone, getMinifiedCssText, getParentRule, getParentStyleSheet, writeCssText
-
Method Details
-
getCssRules
ExtendedCSSRuleList<? extends ExtendedCSSRule> 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.
-
insertRule
Inserts 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.
-
deleteRule
Removes 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 ifindex
is greater than or equal togetCssRules()
.getLength().
-