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

Minifier Breaks Black Translucent Colors #727

Closed
dev-nicolaos opened this issue Apr 29, 2024 · 2 comments
Closed

Minifier Breaks Black Translucent Colors #727

dev-nicolaos opened this issue Apr 29, 2024 · 2 comments

Comments

@dev-nicolaos
Copy link

Environment

Operating Systems Tested On: Windows 10 Enterprise 22H2, Fedora Linux 40

Node Version: 20.10.0

LightningCSS Version: 1.24.1

Steps to Reproduce

  • Clone the reproduction repo
  • Run npm ci to install lightningcss
  • Run npm run bundle-css

Expected Outcome

All the custom properties in bundled.css will have valid color values as specified in main.css

Actual Outcome

Only the white transparency and red color are output correctly. All the black transparencies have the 0 0 0 before the / in the color function removed (e.g. --Black-60:color(display-p3/.6);) in bundled.css making them impossible for the browser to render.

Notes

I feel confident the issue is with the minifiying step. If you set minify to false in the call to bundle in bundle.js, the output values are valid.

@mischnic
Copy link
Member

Playground reproduction

@devongovett
Copy link
Member

I think the spec must have changed at some point, but I can't find when. The are a bunch of tests specifically for this.

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

No branches or pull requests

3 participants