SIGN IN SIGN UP

Do not remove whitespace in token lists

Fixes #1005, fixes #1001, fixes #976, closes #1029, fixes #980, closes #1068, fixes #646, fixes #579

In unknown/custom properties and rules, we do not know what the syntax grammar is, so we don't know where whitespace is significant or not. Previously we tried to be too smart and made some assumptions. This broke certain unknown syntax and also affected custom transformers that tried to replace tokens with other values.

We now no longer remove whitespace during parsing, and during printing only replace whitespace with a single space character instead of trying to completely remove it. This results in worse compression in a few places that we can potentially later improve, but is more correct.

Note that if you write a custom transformer, you are responsible for ensuring that there are whitespace tokens surrounding any values you replace when needed. Lightning CSS does not automatically insert whitespace as it cannot know whether this is correct or not. But at least now Lightning CSS no longer removes whitespace that was already there.
D
Devon Govett committed
32f1f52f025fc43887b20448cc9646b09ef96329
Parent: 4e6492b