Interface CSSStyleSheet

A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet.

MDN Reference

interface CSSStyleSheet {
    cssRules: CSSRuleList;
    disabled: boolean;
    href: string;
    media: MediaList;
    ownerNode: Element | ProcessingInstruction;
    ownerRule: CSSRule;
    parentStyleSheet: CSSStyleSheet;
    rules: CSSRuleList;
    title: string;
    type: string;
    addRule(selector?, style?, index?): number;
    deleteRule(index): void;
    insertRule(rule, index?): number;
    removeRule(index?): void;
    replace(text): Promise<CSSStyleSheet>;
    replaceSync(text): void;
}

Hierarchy (view full)

Properties

cssRules: CSSRuleList
disabled: boolean
href: string
media: MediaList
ownerRule: CSSRule
parentStyleSheet: CSSStyleSheet

Deprecated

MDN Reference

title: string
type: string

Methods

  • Parameters

    • Optional selector: string
    • Optional style: string
    • Optional index: number

    Returns number

    Deprecated

    MDN Reference

  • Parameters

    • index: number

    Returns void

  • Parameters

    • rule: string
    • Optional index: number

    Returns number

  • Parameters

    • Optional index: number

    Returns void

    Deprecated

    MDN Reference

  • Parameters

    • text: string

    Returns void