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]expand the static calc() #5860

Open
yisibl opened this issue Sep 14, 2022 · 1 comment
Open

[css-minifier]expand the static calc() #5860

yisibl opened this issue Sep 14, 2022 · 1 comment
Milestone

Comments

@yisibl
Copy link
Contributor

yisibl commented Sep 14, 2022

Describe the feature

Usually the expressions in calc() can be expanded further in order to reduce the number of bytes.

There is a lot of this styles in animate.css:

animation-delay: calc(1s * 2) = animation-delay: 2s

.animate__animated.animate__delay-2s {
  -webkit-animation-delay: calc(1s * 2);
  animation-delay: calc(1s * 2);
  -webkit-animation-delay: calc(var(--animate-delay) * 2);
  animation-delay: calc(var(--animate-delay) * 2);
}

But if there are percentages in calc(), we have to treat them differently and not expand them. see evanw/esbuild#1821

Babel plugin or link to the feature description

No response

Additional context

No response

@kdy1 kdy1 added this to the Planned milestone Sep 14, 2022
@yisibl
Copy link
Contributor Author

yisibl commented Sep 16, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants