question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

clean-css 5.0.1 leading zeros are not removed

See original GitHub issue

Precheck

Environment

  • clean-css version - npm ls clean-css: 5.0.1
  • node.js version - node -v: 14.15.5
  • operating system: Windows 10

Configuration options

cleancss -O1 specialComments:0 -o 2.css 1.css

Input CSS

kbd {
  padding: 0.2rem 0.4rem;
  font-size: 0.875em;
  color: #fff;
  background-color: #212529;
  border-radius: 0.2rem;
}

Actual output CSS

kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:0.2rem}

Expected output CSS

kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}

I noticed more cases, not only border-radius and it seems to only happen for rems.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jakubpawlowiczcommented, Feb 18, 2021

It’s out as clean-css 5.1.0 and clean-css-cli 5.2.0. Thanks for testing!

1reaction
XhmikosRcommented, Feb 18, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

clean-css 5.0.1 leading zeros are not removed #1143 - GitHub
Hey @XhmikosR - by saying "I noticed more cases" do you mean more cases of border-radius or other properties too?
Read more >
Leading zeros issue in cleancss when using LESS compiler
When I use -x with the less compiler to produce a minified CSS file: lessc -x style.less > style.css. decimals lower than 1...
Read more >
clean-css-cli - NPM Package Overview - Socket.dev
A command-line interface to clean-css CSS optimization library. Version: 5.6.1 was published by jakub.pawlowicz.
Read more >
clean-css/History.md - UNPKG
The CDN for clean-css. ... fixes lack of space removal in variable blocks. 5 ... leading zeros in numerical values.
Read more >
Compare Versions | hlp | npm - Open Source Insights
clean-css 3.4.28. GHSA-wxhq-pm8v-cw75Regular Expression Denial of Service in clean-css. remove. color-string 0.3.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found