Function ruleSelectorAll

  • Functions similarly to querySelectorAll, but for selecting style rules in a CSS stylesheet object. All rules that start with any of the selectors are selected.

    Parameters

    • selectors: string
    • styleElement: HTMLStyleElement
    • Optional firstOnly: boolean

    Returns CSSRule[]

    Example

    import { ruleSelectorAll } from 'deleight/appliance';
    const firstSpanRule = ruleSelectorAll('span', document.getElementsByTagName('style')[0], true)[0];