Name

CSSStyleSheet: a CSS stylesheet — DOM Level 2 CSS, IE 4: Object → CSSStyleSheet

Properties

readonly CSSRule[] cssRules

A read-only, array-like object holding the CSSRule objects that compose the stylesheet. In IE, use the rules property instead. In DOM-compliant implementations, this array includes objects that represent all rules in a stylesheet, including at-rules such as @import directives. Rules of these sorts implement a different interface than that described for CSSRule. These other type of rule objects are not well supported across browsers and are not documented in this book. Be aware, therefore, that you must test any entries in this array to ensure that they define CSSRule properties before you attempt to use those properties.

boolean disabled

If true, the stylesheet is disabled and is not applied to the document. If false, the stylesheet is enabled and is applied to the document.

readonly String href

The URL of a stylesheet that is linked to the document or null for inline stylesheets.

readonly StyleSheet parentStyleSheet

The stylesheet that included this one or null if this stylesheet was included directly in the document.

readonly CSSRule[] rules

The IE equivalent of the DOM-standard cssRules[] array.

readonly String title

The title of the stylesheet, if specified. A title may be specified by the title attribute of a <style> or <link> element that refers to this stylesheet.

readonly String type

The type of this stylesheet, as a MIME type. CSS stylesheets have ...

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.