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

In translate(), zeros in calc() functions are having units removed #1257

Open
mprofitlich opened this issue Oct 5, 2023 · 0 comments
Open

Comments

@mprofitlich
Copy link

Analog to issue #1160 clean-css deletes unites after 0 in a calc() function within a transform: translateX CSS statement. CSS needs the unit however.

The problem occurs in
transform: translateX(calc(…))
but not in
translate: calc(…) 0

Environment

  • clean-css version: 5.3
  • node.js version: 20.8.0
  • operating system: Mac OS 14.0

Configuration options

.pipe(cleanCSS())

Input CSS

transform: translateX(calc((100% - 1.39vw)/ 4 + 0vw))

Actual output CSS

transform: translateX(calc((100% - 1.39vw)/ 4 + 0))

Expected output CSS

transform: translateX(calc((100% - 1.39vw)/ 4 + 0vw))
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