-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Description
🐛 bug report
Parcel outputs invalid CSS in production mode when a declaration with a var()
(and possibly other function values) appears between two nested rules. Example:
div {
table {
color: lime;
}
color: var(--whatever);
span {
color: red;
}
}
Result:
div{& table{color:#0f0}color:var(--whatever)& span{color:red}}
The semicolon after var(--whatever)
gets removed, turning the entire rule invalid. This does not happen in dev mode.
🎛 Configuration (.babelrc, package.json, cli command)
Vanilla Parcel in production mode without any configuaration.
🤔 Expected Behavior
The minifier should not murder basic CSS.
😯 Current Behavior
The minifier murders basic CSS.
💁 Possible Solution
Keep the semicolon I guess 🙃
💻 Code Sample
https://github.com/SirPepe/temp-parcel-css-minifier
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.15.4 |
Node | 23.7.0 |
npm/Yarn | NPM @ 10.9.2 |
Operating System | Ubuntu Linux, 6.8.0-64-generic |
Metadata
Metadata
Assignees
Labels
No labels