matype / stylefmt

stylefmt is a tool that automatically formats stylesheets.
Other
2.1k stars 89 forks source link

number-leading-zero is altering urls #264

Closed jethrolarson closed 7 years ago

jethrolarson commented 7 years ago

This is a SEVERE problem as it sneaks 404s into my code.

example:

.whatever {
   background: url("../../img/spinner.32.32.png");
}
/* fixes to */
.whatever {
   background: url("../../img/spinner0.32.32.png");
}
jethrolarson commented 7 years ago

this is in a scss file btw.

thisispvb commented 7 years ago

The { "number-no-trailing-zeros": true } rule is having a similar issue in SCSS variables

// input.scss
$version: "1.0.0";
$asset-path: "https://cdn.net/v1.0.0";
$font-path: "https://cdn.net/v1.0.0/fonts";
// output.scss
$version: "1.0"; // I get why this gets replaced, more of a nice to have
$asset-path: "https://cdn.net/v1.0";
$font-path: "https://cdn.net/v1.0/fonts";