CSSRule in DOM Level 2 CSS

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

For official information please 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 value description
CHARSET_RULE 2
FONT_FACE_RULE 5
IMPORT_RULE 3
MEDIA_RULE 4
PAGE_RULE 6
STYLE_RULE 1
UNKNOWN_RULE 0

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() CSSRuleList