Skip to content

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

@DJBunge

Description

@DJBunge

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions