-
-
Notifications
You must be signed in to change notification settings - Fork 326
Closed
Description
This could be considered a reopening of #648, or a bug with the implemented fix in #649. That did fix simple cases but it still fails when values contain more than a single var(--X) reference. An example:
border: 1px solid hsla(var(--HUE), var(--SATURATION), var(--LUMINANCE), 0.5)
incorrectly transforms to:
border: 1px solid hsla(var(--hue), var(--saturation), var(--LUMINANCE), 0.5)
The culprit appears to be the greedy leading .* in the regular expression at
| const varRE = /(^.*var)(.*\(.*--.*\))(.*)/i; |
This toLower logic could probably be fixed to handle strings with multiple vars. However, I'd question whether lowercasing should be happening in parseWsc.js at all. I feel like the mergeLonghand plugin should be limiting itself to only merging, and leave lowercasing up to other specialized plugins that can handle that in a more robust way.
Reactions are currently unavailable