-
Notifications
You must be signed in to change notification settings - Fork 12k
postcss-custom-properties warnings when overriding css variables #7991
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
Comments
postcss-custom-properties doesn't support variable declarations on CSS selectors other than :root. Only :root is allowed. That's why you get the warning. Mostly this only means that your variable will not be transpiled back for older browsers. So when you want this to work with older browsers, you have to use :root all the time, so postcss-custom-properties knows what to do with it. |
Is there a way to silence this warning or noting to the tool that I don't care about transpiling this feature back to older browsers? Thanks. |
I don't know about the angular-cli and how it can be configured with it (you have to check by yourself), but the setting of the postcss-custom-properties package you'll find here: |
We need a way to add custom PostCSS config to Angular CLI projects. This issue is related: Using the Bulma CSS library current causes lots of warnings: |
Hi, Thank you for your support 👍 |
Not using Bulma, but running into the same issue since our project doesn't care about older browsers. We really don't want to eject the webpack configuration at this point, so can we can an extra configuration setting or expose the postcss configuration to get rid of these warnings? |
Same here with bulma when calling sass! Does anyone has find an way to fix it? |
I think fix explained here MoOx/postcss-cssnext#186 but we need a way to deliver to Angular. |
Thank you @zoonman for the update! :) |
@jycouet I believe it has to be a part of
I found that error is coming from postcss but there in no way to change its config. |
Found a hackable workaround. As there is no "official" way to provide Angular CLI a Open We're going to change warnings property from |
@trimox thx it works, until there will be a fix or a way to pass options to |
If you don't want to eject from ng and you can afford not having I add it to my package.json
Hack-ish, I know... but might do as a temp solution, while we decide what do we want to do with these custom properties and backward support. |
@ryzy After put this line on script and run it manually, the warnings does nos desapear. May you explain how to entirely implement it? |
Closing as #8289 has a more up to date discussion on the issue. |
What is the workaround for adding postcss-custom-properties support now? We needed this and had it working, albeit in a hacky way, for our IE support, and now it is gone with no official alternative besides rolling back to before this pr was merged. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report
From Issue #7514
Related to PR #7712
Versions.
The log given by the failure.
A lot of warnings are being shown to me since #7712 :
Repro steps.
when I set:
on
styles.scss
,and I override it in a component,
some-component.scss
It's working perfectly fine but it's very annoying seeing a warning for each css variable I override.
May that be related to a
postcss-custom-properties
limitation?The text was updated successfully, but these errors were encountered: