-
-
Notifications
You must be signed in to change notification settings - Fork 75
custom properties :root
class support
#1612
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
Hi @movie4, Thank you for making this request. Unfortunately this plugin is purely a fallback for very old browser versions that do not support custom properties. Within the scope of the plugin it would be incorrect to provide automatic fallback for anything other than Providing fallbacks for Are you trying to inject specific variables into multiple output/bundle files? |
Thanks for the quick reply! We want to change variables by class. We solved this situation using the |
Do you mean: "this issue can be closed" or "this selector works"? This plugin doesn't support changing variables by classnames. We can not change this :) |
this selector works as we need it |
Yeah, we can't change the behavior of the plugin :) You have several options:
Maybe this tool can help? |
What would you want to propose?
Hello! We encountered the fact that the type construction is not supported
Suggested solution
In source code we found that the package does not process the class of the
:root
element nohttps://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-custom-properties/src/get-custom-properties-from-root.ts
export const ROOT_SELECTOR_REGEX = /^:root$/i;
```need to modify the regular expression to support the className``
Additional context
No response
Validations
Would you like to open a PR for this feature?
The text was updated successfully, but these errors were encountered: