Don’t add spaces around raw /
that are preceded by numbers
#8688
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We would previously add spaces around slashes that were preceded by numbers (with a few other constraints) but these are not necessary. In CSS slashes don't need to have spaces around them because they're tokenized such that whitespace is insignificant.
This was a problem for plugins that used file paths as raw values without quotes. We would see
foo-[/foo/bar-2/baz.png]
and normalize the raw value internally by turning this into/foo/bar-2 / baz.png
and passing that as the value given tomatchUtilities
.We already limited adding spaces around operators to when using min/max/clamp/calc/etc… in #8091 but kept the spaces around slashes explicitly as to cause less churn for utilities like aspect ratio. There shouldn't be any reason we actually need to keep them though so this change seems fine.
Fixes #8661