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?: string, style?: string, index?: number): number;
        deleteRule(index: number): void;
        insertRule(rule: string, index?: number): number;
        removeRule(index?: number): void;
        replace(text: string): Promise<CSSStyleSheet>;
        replaceSync(text: string): void;
    }
    Hierarchy

    Properties

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

    MDN Reference

    title: string
    type: string

    Methods

    • Parameters

      • Optionalselector: string
      • Optionalstyle: string
      • Optionalindex: number

      Returns number

      MDN Reference

    • Parameters

      • index: number

      Returns void

    • Parameters

      • rule: string
      • Optionalindex: number

      Returns number

    • Parameters

      • Optionalindex: number

      Returns void

      MDN Reference

    • Parameters

      • text: string

      Returns void