-
Notifications
You must be signed in to change notification settings - Fork 281
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
How do I make Autoprefixer process my new css files? #642
Comments
I ran into the same problem. If I got it right, you wish to resolve variables in your CSS files, that are declared in an external file. If Autoprefixer is not able to resolve CSS variables from external files, I don't see how it should know which values to insert into the CSS variable polyfills. Are you aware of such a feature in Autoprefixer? If there is no such feature, having a redundant include of the Otherwise, a workaround on the side of WP Rig could be to detect the minifed content of the |
Thank you for your answer. I'll leave the include for now. |
Another workaround is to declare your own custom properties in your custom stylesheet. The fallbacks will appear in the styesheet. I'll sniff around to see if there is something to be done in the interim, or if it's something we'll include later. |
Issue Overview
Autoprefixer does not seem to process the new CSS files that I add to the assets/css/src/ folder. For example, the color variables don't get a fallback unless I include _custom-properties.css in the new CSS file, which is not ideal because it declares all the variables again.
I am working on two themes that both have this problem. I have tried to call the print_styles() function on a template page or on a template part, and I have the same problem both times.
Describe your environment
Editor: VS code
OS: MacOS Mojave (10.14.6)
Steps to Reproduce
Expected Behavior
background-color: : #e36d60;
background-color: var(--color-theme-primary));
Current Behavior
background-color: var(--color-blue);
Possible Solution
Screenshots / Video
Related Issues and/or PRs
The text was updated successfully, but these errors were encountered: