postcss-each-decl
PostCSS helper method to shallowly iterate over each declaration.
Introduction
Ever since PostCSS 5.0, a container method called walkDecls
traverses the container's descendant nodes, calling a callback function for each declaration node found. Conversely, this project exposes a simple function that shallowly iterates over a container's direct child nodes, using no recursion.
const rule = postcssfirst; ;
The above example outputs the following:
foo FOO
bar BAR
qux QUX
Installation
$ npm install postcss-each-decl
Usage
var postcss = ;var eachDecl = ; var rule = postcssfirst;;