• Selects all the style rules in the stylesheet whose cssText begin with any of the specified selectors.

    Parameters

    • selectors: string

      The starting text of the style rules to return

    • styleSheet: CSSStyleSheet

      The CSSStyleSheet containing the rules to select

    Returns Iterable<CSSRule>

    The selected style rules

    Example

    import { selectAll } from 'deleight/css';
    const cssStyleSheet = await loadStyle('component1.css');
    const spanRules = [...selectAll('span', cssStyleSheet)];
    // `selectAll` returns a generator!