Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Css when using clamp #28

Open
vikktor opened this issue Jan 17, 2024 · 5 comments
Open

Error in Css when using clamp #28

vikktor opened this issue Jan 17, 2024 · 5 comments

Comments

@vikktor
Copy link

vikktor commented Jan 17, 2024

Installed product versions

  • Visual Studio: 2022 Community
  • This extension: 2.9.9

Description

Bundling fails if clamp CSS function is used anywhere in css code.

Steps to recreate

  1. Insert (for example) this line in your css: font-size: clamp(1.625rem, 1.3036rem + 1.4286vw, 3rem);
  2. Try to bundle it using this extension

Current behavior

Bundling fails with error:
Error (Bundler & Minifier) Unexpected token, found ' '

@failwyn
Copy link
Owner

failwyn commented Feb 28, 2024

Can you check if this is supported by NUglify?

@failwyn
Copy link
Owner

failwyn commented Apr 3, 2024

The css you provided compiles fine for me, can you provide the entire file that is causing the error?

@vikktor
Copy link
Author

vikktor commented Apr 5, 2024

Sure thing.

Just did experiment with only this line in css file:

color.css
body { font-size: clamp(1.625rem, 1.3036rem + 1.4286vw, 3rem); }

bundleconfig.json
{ "outputFileName": "wwwroot/css/color.min.css", "inputFiles": [ "wwwroot/css/color.css" ], "minify": { "enabled": true, "commentMode": "none" } }

Result in Visual studio 2022 (Version 17.9.0) task runner:

wwwroot/css/color.min.css
Unexpected token, found ' '
Unexpected token, found ' '
Expected function, found ' '
Expected semicolon or closing curly-brace, found ' '

@failwyn
Copy link
Owner

failwyn commented Jul 18, 2024

This error is caused by using math inside the clamp function; Can you add a bug to the NUglify repository and link it here?

@vikktor
Copy link
Author

vikktor commented Jul 31, 2024

Sorry, I'm no longer using BundlerMinifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants