import { postcss } from "https://deno.land/x/bundler@0.6.5/deps.ts";
const { Container } = postcss;
Traverses the container’s descendant nodes, calling callback for each node.
Like container.each(), this method is safe to use if you are mutating arrays during iteration.
If you only need to iterate through the container’s immediate children,
use Container#each
.
root.walk(node => {
// Traverses all descendant nodes.
})
Parameters
callback: (node: ChildNode, index: number) => false | void
Iterator receives each node and index.