Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don’t add spaces around raw / that are preceded by numbers #8688

merged 2 commits into from Jun 20, 2022


Copy link

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 to matchUtilities.

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

@thecrypticace thecrypticace merged commit 00af2e8 into master Jun 20, 2022
@thecrypticace thecrypticace deleted the fix/no-spaces-around-number-slash branch June 20, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Automated space adding to look-like-mathematic-operators leads to multiple errors
1 participant