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 to negative numbers following a comma #12324

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

thecrypticace
Copy link
Contributor

Given an arbitrary value like mt-[clamp(0.25rem,-0.6731rem+4.1026vw,4.25rem)] we would incorrectly "fix" the operator spacing for the negative number if it followed a comma by inserting a space. However, the only valid incantation here is to not have a space.

Before:

.mt-\[clamp\(0\2c -0\.5rem\+4vw\2c 4rem\)\] {
  margin-top: clamp(0, - 0.5rem + 4vw,4rem);
}

After:

.mt-\[clamp\(0\2c -0\.5rem\+4vw\2c 4rem\)\] {
  margin-top: clamp(0,-0.5rem + 4vw,4rem);
}

Fixes #12318

@thecrypticace thecrypticace merged commit 0985d26 into master Oct 30, 2023
10 checks passed
@thecrypticace thecrypticace deleted the fix/negative-numbers-after-comma branch October 30, 2023 14:47
thecrypticace added a commit that referenced this pull request Oct 30, 2023
* Don’t add spaces to negative numbers following a comma

* Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arbituray Value using Clamp() doesn't work if there is a negative value
1 participant