BundlerMinifier icon indicating copy to clipboard operation
BundlerMinifier copied to clipboard

Using hsl() in CSS errors when trying to do calculation on output values

Open DJBunge opened this issue 1 year ago • 3 comments

Installed product versions

  • Visual Studio: Community 2022 Version 17.11.5
  • This extension: 2.9.11

Description

When using hsl() in CSS file, trying to adjust one of the output values causes file to not minify.

Steps to recreate

Inside of a CSS file, put the following:

:root {
  --blueHSL: hsl(from hsl(200deg 50% 10%) h s calc(l + 50))  ;
  --blueHSL: hsl(from #24255b h s calc(l + 50)) ;
}

Current behavior

Multiple errors output to Error List as seen in attachment.

ErrorList

Expected behavior

The internal "calc(l + 50)" should be output as-is in the minified CSS. The line works when I use the non-minified CSS file, so it seems that the issue is with the minification logic.

DJBunge avatar Oct 21 '24 22:10 DJBunge

This sounds like an issue with NUglify.

I'm testing a new version today, with the latest version of NUglify, if it's not fixed in that version, would you mind creating a test for NUglify, adding an issue to that github repository, and linking it here so that I can look into fixing it?

failwyn avatar Jan 09 '25 12:01 failwyn

I am using straight CSS.

On Thu, Jan 9, 2025, 6:57 AM Jason Moore @.***> wrote:

This sounds like an issue with NUglify.

I'm testing a new version today, with the latest version of NUglify, if it's not fixed in that version, would you mind creating a test for NUglify, adding an issue to that github repository, and linking it here so that I can look into fixing it?

Also, I'm not sure if you are using Node SASS or Dart SASS, but since I cannot get Node SASS to compile anymore, and it's no longer supported, I am removing it from WebCompiler; if you are using the default Dart SASS, you can ignore this part.

— Reply to this email directly, view it on GitHub https://github.com/failwyn/BundlerMinifier/issues/39#issuecomment-2580090961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2A5UT52KNCHQH5EIAWW632JZW3RAVCNFSM6AAAAABQLEF7Y6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBQGA4TAOJWGE . You are receiving this because you authored the thread.Message ID: @.***>

DJBunge avatar Jan 09 '25 14:01 DJBunge

This looks like an issue with NUglify, I'll look into what it would take to fix.

failwyn avatar Jan 09 '25 15:01 failwyn