+- **Writes act on the current node and only while printing.** `replace(text)` and `remove()` take effect when the node prints after its visitors, which still run its printer for what it records; on a walk that prints nothing, or on a comment, which prints from the token stream, they do nothing, and a rule whose block is large enough to stream prints as written. In CSS, what holds a replaced node prints the text its children printed as, without the minifier's rewrites, which read fields the replacement no longer matches; the rest of the sheet minifies as before. HTML streams most elements to the output before their `exit` and JavaScript decides parentheses and spacing from the original node, so neither has writes yet.
0 commit comments