MinifyAll icon indicating copy to clipboard operation
MinifyAll copied to clipboard

[Bug] css - padding with 4 values - removes unit if value contains 1.0em as value

Open axelhahn opened this issue 2 years ago β€’ 1 comments

🐞 Bug Report

Describe the bug

In a css file I add a class that has a padding rule with 4 values: .example{padding: 2em 1.0em 0.7em 1.0em;}

The minified version scrambles that to

.example{padding:2em 1.0 .7em 1.0;}

(it removes"em" for 2nd and 4th padding item)


Is this a regression?


To Reproduce

  1. in a css file add .example{padding: 2em 1.0em 0.7em 1.0em;}
  2. minify it

Expected behaviour

  • Keep the unit of padding values in minified versions

Media prove


Your environment

  • OS: Manjaro Linux (up to date; has rolling release; kernel 5.18)
  • Node version: v18.8.0
  • Npm version: 8.19.1
  • Browser name and version: -
  • Code Oss: 1.171.0
  • plugin MinifyAll: v2.10.0

Additional context

  • The wrong handling also happens on other css attributes (you can replace "padding:" by "margin:" and get the same wrong result)
  • A troublemaker is the dot in the value. By changing "1.0em" with "1em" the minify works correctly.

axelhahn avatar Sep 17 '22 21:09 axelhahn

Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!

welcome[bot] avatar Sep 17 '22 21:09 welcome[bot]