Grouping CSS at-rule writer of nested CSS rules.

Supports at-rules like @media, @keyframes, or @condition.

Hierarchy

  • Group

Properties

Methods

Properties

isGroup: true

Methods

  • Inserts a nested empty grouping CSS at-rule into target one, with some restrictions.

    Parameters

    • name: string

      Rule name of newly inserted at-rule. E.g. @media, @keyframes, or @condition.

    • Optional params: string

      Verbatim parameters of newly inserted rule. E.g. media query.

    • Optional index: number

      A positive integer less than or equal to the number of added rules, representing the newly inserted rule's position in target grouping rule. The default is the number of added rules.

    Returns Group

    Inserted CSS style declarations writer.

  • Inserts a nested empty CSS style declarations rule into target grouping one, with some restrictions.

    Parameters

    • selector: string

      CSS selector of the newly inserted rule.

    • Optional index: number

      A positive integer less than or equal to the number of added rules, representing the newly inserted rule's position in target grouping rule. The default is the number of added rules.

    Returns Style

    Inserted CSS style declarations writer.

Generated using TypeDoc