public interface CssRule
An object implementing the CSSRule
ReactDOM interface represents a single CSS rule. References to a
CSSRule
-implementing object may be obtained by looking at a
CSS
style sheet's
cssRules
list.
There are several kinds of rules. The CSSRule
interface specifies the properties common to all
rules, while properties unique to specific rule types are specified in the more specialized interfaces for
those rules' respective types.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCssText()
Returns the textual representation of the rule, e.g.
|
CssRule |
getParentRule()
Returns the containing rule, otherwise
null . |
CssStyleSheet |
getParentStyleSheet()
Returns the stylesheet object in which the current rule is defined.
|
int |
getType()
One of the Type constants indicating the type of CSS rule.
|
void |
setCssText(java.lang.String cssText)
Sets the textual representation of the rule, e.g.
|
java.lang.String getCssText()
"h1,h2 { font-size: 16pt }"
void setCssText(java.lang.String cssText)
"h1,h2 { font-size: 16pt }"
cssText
- The textual representation of the ruleCssRule getParentRule()
null
. E.g. if this rule is a style rule inside an
@media
block, the parent rule would be that
CSSMediaRule
.CssStyleSheet getParentStyleSheet()
int getType()
CssRuleType