APIdia Launch Partner
Top Description Fields Methods
org.w3c.dom.css

public Interface CSSStyleRule

extends CSSRule
Imports
org.w3c.dom.DOMException

The CSSStyleRule interface represents a single rule set in a CSS style sheet.

See also the Document Object Model (DOM) Level 2 Style Specification.

Since
1.4, DOM Level 2

Field Summary

Inherited from org.w3c.dom.css.CSSRule:
CHARSET_RULEFONT_FACE_RULEIMPORT_RULEMEDIA_RULEPAGE_RULESTYLE_RULEUNKNOWN_RULE

Method Summary

Modifier and TypeMethod and Description
public String
getSelectorText()

The textual representation of the selector for the rule set.

public CSSStyleDeclaration
getStyle()

The declaration-block of this rule set.

public void
setSelectorText(String selectorText)

The textual representation of the selector for the rule set.

Inherited from org.w3c.dom.css.CSSRule:
getCssTextgetParentRulegetParentStyleSheetgetTypesetCssText

Method Detail

getSelectorTextback to summary
public String getSelectorText()

The textual representation of the selector for the rule set. The implementation may have stripped out insignificant whitespace while parsing the selector.

getStyleback to summary
public CSSStyleDeclaration getStyle()

The declaration-block of this rule set.

setSelectorTextback to summary
public void setSelectorText(String selectorText) throws DOMException

The textual representation of the selector for the rule set. The implementation may have stripped out insignificant whitespace while parsing the selector.

Exceptions
DOMException:
SYNTAX_ERR: Raised if the specified CSS string value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.