getCssDeclarations

Type:Function
Status:beta
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.style

Get all the CSSRules of the passed type

Params

  1. typeName”style”string

    CSSRule type to search for, valid types: unknown, style, charset, import, media, fontface, page, keyframes, keyframe, namespace, counter, supports, document, fontfeature, viewport, region

  2. rules[]array

    Array of CSSRules to search

  3. predecate”Boolean”function

    Predecate function to filter matches

Return

  1. -array

    Array of matching CSSRules

Example

import { getCssDeclarations } from '@blackbyte/sugar/dom';
getCssDeclarations('style', [myCoolCssRules]);

Todo

  • testsnormal