CSSRule in DOM Level 2 CSS

The CSSRule interface is the abstract base interface for any type of CSS statement.

For more information see http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.html#CSS-CSSRule.

Instance Properties

name type description
cssText String
parentRule CSSRule (read only)
parentStyleSheet CSSStyleSheet (read only)
type Number (read only)

Constants

name object value description
UNKNOWN_RULE CSSRule 0
STYLE_RULE CSSRule 1
CHARSET_RULE CSSRule 2
IMPORT_RULE CSSRule 3
MEDIA_RULE CSSRule 4
FONT_FACE_RULE CSSRule 5
PAGE_RULE CSSRule 6

Properties that are a CSSRule

name object description
ownerRule CSSStyleSheet (read only)
parentRule CSSRule (read only)
parentRule CSSStyleDeclaration (read only)

Methods that return a CSSRule

name of object description
item(index) CSSRuleList