BundlerMinifier icon indicating copy to clipboard operation
BundlerMinifier copied to clipboard

When Minifying "0fr", the unit got removed.

Open Philipp-Strobl opened this issue 2 years ago • 7 comments

Installed product versions

  • Visual Studio: 2022 17.6.3
  • This extension: 2.9.9

Description

When Minifying "0fr", the unit got removed.

Steps to recreate

  1. Create a class and add for example "grid-template-rows" with the value of "0fr".
  2. Minify code
  3. Check in Browser (tested Chrome 114.0.5735.134, FireFox 114.0.2 and Edge 114.0.1823.58)

Current behavior

For some reason the unit "fr" is removed when the value 0 is provided.

Expected behavior

The unit "fr" is not removed, like on %.

Philipp-Strobl avatar Jun 26 '23 08:06 Philipp-Strobl

We use NUglify to minimize the css; the removal of the fr is probably an optimization; Is there a noticeable difference between 0fr and 0?

failwyn avatar Jul 06 '23 14:07 failwyn

Ya there is. If you want to transition for example "grid-template-columns" from "1fr" to "0fr" and the unit is removed, no animation is shown.

Philipp-Strobl avatar Jul 07 '23 07:07 Philipp-Strobl

I'd post this issue on the NUglify GitHub page and see what they say about it.

failwyn avatar Jul 07 '23 10:07 failwyn

Cool, thank you.

Philipp-Strobl avatar Jul 07 '23 10:07 Philipp-Strobl

Hey @failwyn, any new knowledge here?

p-strobl avatar Jan 09 '24 08:01 p-strobl

Did you add the issue to the NUglify repo? Once I get some free time, I can see if I can fix the issue for them and submit a pull request, if accepted I'll publish a new version of the extensions.

failwyn avatar Jan 09 '24 11:01 failwyn

I submitted a PR on NUglify that will fix this issue; I have a few other NUglify issues to look at, then I'll publish a new version.

failwyn avatar Apr 03 '24 22:04 failwyn