-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
fix(css_formatter): improve CSS numeric formatting #5052
Conversation
CodSpeed Performance ReportMerging #5052 will not alter performanceComparing Summary
|
This would also effectively close #5005, right? Since this makes the formatter conflict with that rule. |
I'm in favour with closing the rule, there's no need for that now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Yes, I think the formatter has already handled the trailing zeros for us. |
Co-authored-by: Emanuele Stoppa <[email protected]>
Summary
Improve CSS numeric formatting with two changes:
.5em
, ensure the numeric part is formatted as a number rather than simply printing the token as-is.x.0000
.Prettier formats such numbers differently across languages. In JavaScript,
x.0000
is formatted asx.0
, whereas in CSS, it is formatted asx
.Closes #5031
Closes #5005
Test Plan
Added tests