Combines a CSS selector with a list of CSS properties. Use the static methods to create

Properties

Methods

Properties

props: readonly CssProp[]

CSS properties of this rule.

selector: string

The selector of the rule. It will start with a space character if it is supposed to select child (or descendent) elements.

Methods

  • Creates a rule with a child (or descendent selector). In particular when combined with a css class Boo a selector like div will be combined into .Boo div, i.e. with a space before the given selector.

    To address a direct child, use > like in CssRules.child('>div', ...).

    Parameters

    • selector: string
    • Rest ...props: CssProp[]

    Returns CssRule

  • Creates a rule with the given detail selector. The selector will be written to a style element such that it subselects the root element. For example if combined with a css class Boo a selector like :hover will be combined into .Boo:hover.

    Parameters

    • selector: string
    • Rest ...props: CssProp[]

    Returns CssRule

  • Creates a rule with an empty selector, meaning it should apply to the host element.

    Parameters

    Returns CssRule

Generated using TypeDoc