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

[CSS minifier] The infinity keyword should be preserved in calc() #1839

Closed
yisibl opened this issue Dec 8, 2021 · 1 comment
Closed

[CSS minifier] The infinity keyword should be preserved in calc() #1839

yisibl opened this issue Dec 8, 2021 · 1 comment

Comments

@yisibl
Copy link
Contributor

yisibl commented Dec 8, 2021

.foo {
  width: calc(infinity * 2);
  height: calc(infinity * 1px);
  padding: calc(InFiNiTy);
}

esbuild 0.14.2 output:

.foo{width:Infinity;height:Infinitypx;padding:Infinity}

Expectations

Maintain the output as is.

CSS Spec: https://drafts.csswg.org/css-values/#calc-error-constants

I'm not sure if infinity/-infinity will trigger this bug in other calculation functions.
Perhaps we should do a thorough check of similar issues to ensure that the new CSS syntax is not broken.

@evanw evanw closed this as completed in 034a56f Dec 12, 2021
@yisibl
Copy link
Contributor Author

yisibl commented Dec 13, 2021

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

No branches or pull requests

1 participant