Closed arggh closed 7 years ago
Also, trying Sass calculations produces just invalid properties, like:
.checkbox {
width: 100px / 2;
}
will output just:
.checkbox {
width: 100px / 2;
}
@nathantreid do you have any updates if this is an actual issue or something I have misconfigured? Can I help in any way to resolve it?
Sorry for the delay on this! There was a bug in the file extension handling for SCSS files preventing multi-dot file extensions (like somefile.m.css
). This has been fixed in 2.7.4.
After updating to 2.7.4
I'm in a world of hurt! PostCSS functions are being complained about by SCSS Compilation...
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Processing Step: SCSS compilation
Unable to compile /Users/arggh/Development/app/client/components/common/circular_button/circular_button.m.css
Line: 80, Column: 63
Error: argument `$color` of `lightness($color)` must be a color
Backtrace:
client/components/common/circular_button/circular_button.m.css:172, in function `lightness`
client/components/common/circular_button/circular_button.m.css:172
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=> Errors prevented startup:
While processing files with nathantreid:css-modules (for target web.browser):
/Users/arggh/Development/app/node_modules/node-sass/lib/index.js:439:16: argument `$color` of `lightness($color)` must be a color
Can you post some sample code? Does the PostCSS function syntax conflict with the SCSS function syntax?
.cta {
background: $primary;
background: linear-gradient(to bottom right, color($primary lightness(+ 10%)) 0%, color($primary lightness(- 10%)) 100%);
box-shadow: $darkShadow;
}
$primary is declared in my PostCSS global variables.
The color lib for PostCSS in question: https://github.com/postcss/postcss-color-function
It appears this is a conflict between SCSS and the postcss-color-function
plugin since the Sass compiler views that as an attempted SCSS function call: https://www.sassmeister.com/gist/c1a198679fd76b456ad100b213365aeb.
Unfortunately, I think you might have to choose between scss
and the postcss-color-function
plugin.
I came to the same conclusion and already ditched scss
for now, since I'm doing just fine with PostCSS and all the plugins there are for it.
Thanks for help & fixes!
I just tried to use a Sass mixin in my project. I had thought I had this beast configured, but this proves otherwise.
This code:
will produce the error
and if I try to use a variable
I get this:
and my configuration is here:
Using variables defined in postcss-simple-vars works just fine.