Closed dan-gamble closed 8 years ago
Sorry, I am not following what you want. What is your issue?
Basically you can supply a directory in postcss-mixins
then it will read them files and make the mixins available on the global scope.
Just wondering if something of the equivalent could be added to this so i could use the variables without having to implicitly import the file
Implicit is a bad thing imo. Confuse newbies. And it's definitely not in the scope of this plugin I think, which try to follow the spec, even if it have to impose restriction (like for :root) Why don't you use "variables" option instead?
I would use the variables
options but currently some of my variables are built based on other variables:
--Font_Size-base: 16px;
--Line_Height-base: calc(var(--Font_Size-base) + 10px);
As far as i know i wouldn't be able to do this with the variables
option
If you define this in JS (via "variables" option), you can do whatever you want, without the "pain" of CSS syntax.
That could work, might make it a bit more messier than i'd like but that would work, thanks :)
Would it be possible to add an option like
postcss-mixins
mixinsDir
?My use case is:
property-definitions.css
If i was to use the
variables
option i wouldn't be able to usecalc()
to create certain properties :)