-
Notifications
You must be signed in to change notification settings - Fork 9
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
It breaks on “space toggle hack” #37
Comments
I can't reproduce this on my end. Would you mind contributing a failing test case? |
I faced the same issue during the integration of Tailwind, the bug is a bit tricky since it won't appear if the css was written in file, it only works when other PostCSS plugin emits a declaration with an empty string value . You can try to run a test like this one: test.only('tailwind', async (t) => {
const tailwind = postcss.plugin('tailwind', () => (root) => {
root.walkAtRules('tailwind', (atRule) => {
atRule.replaceWith(postcss.decl({ prop: '--tw-props', value: ' ' }));
});
});
const input = '@tailwind base;';
const processor = postcss([tailwind, plugin]);
const result = await processor.process(input);
console.log(t, result);
}); The error will be as follows:
And it looks like updating |
See https://css-tricks.com/a-dry-approach-to-color-themes-in-css/ and https://lea.verou.me/2020/10/the-var-space-hack-to-toggle-multiple-values-with-one-custom-property/
Example code:
error:
The text was updated successfully, but these errors were encountered: