-
Notifications
You must be signed in to change notification settings - Fork 61
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
Using variable inside @media conditional not working #91
Comments
@klase Hi, use postcss-at-rules-variables for at-rules because this feature in is the plans |
Thanks for the plugin suggestion @Scrum. Haven't tried but looks like you can run them together for now. Seems like something this plugin could support as well if someone wants to submit a pull request 🤔 var postcss = require('postcss');
var cssvariables = require('postcss-css-variables');
var atVariables = require('postcss-at-rules-variables');
var fs = require('fs');
var mycss = fs.readFileSync('input.css', 'utf8');
// Process your CSS with postcss-css-variables
var output = postcss([
cssvariables(/*options*/),
atVariables({ /* atRules: ['media'] */ })
])
.process(mycss)
.css;
console.log(output); |
@MadLittleMods Hi, It is more correct to use the var postcss = require('postcss');
var cssvariables = require('postcss-css-variables');
var atVariables = require('postcss-at-rules-variables');
var fs = require('fs');
var mycss = fs.readFileSync('input.css', 'utf8');
// Process your CSS with postcss-css-variables
var output = postcss([
atVariables({ /* atRules: ['media'] */ })
cssvariables(/*options*/),
])
.process(mycss)
.css;
console.log(output);
we can install the |
@Scrum I can't assign a non-collaborator 😬 Just curious, why is it better to have |
ups ))
No, you can see the tests
Now I can not remember the case in which it was necessary |
The following does not compile properly (--container-max is set to 1200px):
Expected:
Result:
The text was updated successfully, but these errors were encountered: