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

[Bug]: CssMinimizer returns a warning from postcss-calc when css contains newest color function #220

Closed
massimo-cassandro opened this issue Sep 4, 2024 · 2 comments
Labels

Comments

@massimo-cassandro
Copy link

Describe the bug

If the css contains something like:

hsl(from #036 h s calc(l + 20))

This warning, relative to css calc is returned from webpack cssMinimizer

__output_file__.css from Css Minimizer plugin
postcss-calc: __output_file__.css:19:1342: Lexical error on line 1: Unrecognized text.

  Erroneous area:
1: l + 20
^..^

Expected behaviour

no warning must be emitted

Steps to reproduce

parse a css with some property containing a color function that uses calc, i.e:

.selector {
  filter: drop-shadow(0 0 9px hsl(from #c00 h s calc(l + 20)));
}

Version

8.4.44

Environment

System:
    OS: macOS 13.6.9
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 275.57 MB / 16.00 GB
  Binaries:
    Node: 22.3.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 128.0.6613.114
    Safari: 17.6
  Packages:
    babel-loader: ^9.1.3 => 9.1.3 
    copy-webpack-plugin: ^12.0.2 => 12.0.2 
    css-loader: ^7.1.2 => 7.1.2 
    css-minimizer-webpack-plugin: ^7.0.0 => 7.0.0 
    dotenv-webpack: ^8.1.0 => 8.1.0 
    file-loader: ^6.2.0 => 6.2.0 
    html-loader: ^5.1.0 => 5.1.0 
    html-webpack-plugin: ^5.6.0 => 5.6.0 
    postcss-loader: ^8.1.1 => 8.1.1 
    raw-loader: ^4.0.2 => 4.0.2 
    style-loader: ^4.0.0 => 4.0.0 
    terser-webpack-plugin: ^5.3.10 => 5.3.10 
    webpack: ^5.93.0 => 5.94.0 
    webpack-cli: ^5.1.4 => 5.1.4 
    webpack-dev-server: ^5.0.4 => 5.0.4 
    webpack-manifest-plugin: ^5.0.0 => 5.0.0 
    webpack-remove-empty-scripts: ^1.0.4 => 1.0.4

Package details

├─┬ @csstools/[email protected]
│ └── [email protected] deduped
├─┬ @fullhuman/[email protected]
│ ├── [email protected] deduped
│ └─┬ [email protected]
│   └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected] deduped
│ │ │ │ └─┬ [email protected]
│ │ │ │   └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ └── [email protected] deduped
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ ├─┬ @csstools/[email protected]
│ │ │ └── [email protected] deduped
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @csstools/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   ├─┬ [email protected]
│ │   │ └── [email protected] deduped
│ │   └── [email protected] deduped
│ └─┬ [email protected]
│   ├── [email protected] deduped
│   └─┬ [email protected]
│     ├─┬ [email protected]
│     │ └── [email protected] deduped
│     └── [email protected] deduped
└─┬ [email protected]
  ├─┬ [email protected]
  │ └── [email protected] deduped
  └── [email protected] deduped

Additional context

No response

@angelikatyborska
Copy link

I think this bug was already reported in #216

(I came here because I'm also experiencing the same bug and wanted to see if I need to report it too 😁)

@alexander-akait
Copy link
Collaborator

Close in favor of #216

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

No branches or pull requests

3 participants