clean-css 5.0.1 leading zeros are not removed
See original GitHub issuePrecheck
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 rem
s.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s out as clean-css 5.1.0 and clean-css-cli 5.2.0. Thanks for testing!
I tried our v4-dev branch too and seems to be fine too: