Module: walkRules

(require("walkRules"))(rules, callback, testopt)

Recursively walk all "normal" rules, i.e. rules with selectors

Parameters:
Name Type Attributes Description
rules Object | Array

AST or array of CSS rules

callback function

Function to be executed for each matching rule. Rule passed as the only argument.

test Object <optional>
Properties
Name Type Description
rules string | RegExp | function | Array

Which rules the callback runs on

type string | RegExp | function | Array

Which rule types the walker runs on

ancestors string | RegExp | function | Array

Which rules the walker descends on

Source:
Returns:

The return value of the callback (which also breaks the loop) or undefined.