-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Custom properties are not replaced with their values when preserve: false
#661
Comments
Hi @ZauberNerd thank you for reaching out! We indeed overlooked this pattern in |
@ZauberNerd The fix was just released : https://github.com/csstools/postcss-plugins/blob/99a0d34b0694daf59d7d9f7f1c8e517109d267db/plugins/postcss-custom-properties/CHANGELOG.md#12110-october-20-2022 Can you let us know if this fully resolves your issue? |
Wow, this was really fast. I'm on my way into the weekend, so I'll check on Monday morning |
@romainmenke thanks for fixing this. It works again! |
@ZauberNerd Thank you for verifying 🎉 |
Bug description
Since
postcss-custom-properties
12.1.9
custom properties are not correctly replaced in some cases, while still removing their declaration when settingpreserve: false
.This leads to generated CSS that contains a reference to a custom property, but not the custom property itself, thus causing it not to be applied.
This bug seems to be introduced by: #620, which was caused by: #619
Source CSS
Expected CSS
Actual CSS
Does it happen with
npx @csstools/csstools-cli <plugin-name> minimal-example.css
?Yes
Debug output
No response
Extra config
npx @csstools/csstools-cli postcss-custom-properties minimal-example.css -p '{"preserve":false}'
What plugin are you experiencing this issue on?
PostCSS Custom Properties
Plugin version
12.1.9
What OS are you experiencing this on?
Linux
Node Version
18.11.0
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: