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

local-css minification: case-insensitive classes conflict #4030

Open
isjs0 opened this issue Jan 7, 2025 · 1 comment
Open

local-css minification: case-insensitive classes conflict #4030

isjs0 opened this issue Jan 7, 2025 · 1 comment
Labels

Comments

@isjs0
Copy link

isjs0 commented Jan 7, 2025

When using esbuild with CSS modules, the minification process can result in conflicting class names due to CSS being case-insensitive. For example:

Input CSS:
.class1 { color: red; } .class2 { color: blue; }

Some Minified Output:
.a { color: red; } .A { color: blue; }

In HTML, .a and .A are treated as the same class due to case insensitivity, which causes style conflicts or overrides. This behavior can break functionality.

In Example 0.24.2 expected color: #004, but applied color: #01a.

@evanw
Copy link
Owner

evanw commented Jan 9, 2025

That's not good at all. Thanks very much for the report.

@evanw evanw added the css label Jan 9, 2025
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

2 participants