SassError: $color: null is not a color #12259
-
What happens?Upgraded to the latest (6.7.0) npm package, and I get the following error when compiling my scss: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 10 replies
-
Our team had the same issue. Also with scale-color. When we hard coded package to "6.6.3" our build was fixed again. |
Beta Was this translation helpful? Give feedback.
-
Can you please give me details on how to replicate this? v6.7.0 builds fine for me. |
Beta Was this translation helpful? Give feedback.
-
I wouldn't know how to repro from scratch but with our code base, after updating to 6.7.0, scale-color was no longer accepting a variable for argument $color. When I put hex color values that resolved that particular function but then it complained about another function error 0: argument So I had to change things like I know the response could be, well fix your code base, but it works fine with 6.6.3. And that is in _foundation-setting.scss which at the top says // DO NOT EDIT THIS FILE - USE theme.scss to override variables instead |
Beta Was this translation helpful? Give feedback.
-
Our webpack pipeline also worked perfectly with v6.6.3. Except for the obsolete dart sass errors. Details about our webpack setup: |
Beta Was this translation helpful? Give feedback.
-
Do you have |
Beta Was this translation helpful? Give feedback.
-
Please compare your settings file with the one that ships with Foundation. |
Beta Was this translation helpful? Give feedback.
-
I´ve compared and fixed two changes in the settings file. Now it's identical. However, now my build does not work at all. It hangs without any output. I´ve tested to revert to 6.6.3, and the same build setup works perfectly (except for the obsolete dart sass warnings). |
Beta Was this translation helpful? Give feedback.
-
Similar issues, @include add-foundation-colors; is included. Was broken when trying to update from 6.6.3 to 6.7.1 |
Beta Was this translation helpful? Give feedback.
-
I was just hit with this error tonight. I had updated my site's resources a couple of days ago, but just tonight rebuilt the CSS files and ran into the "Error: $color: null is not a color" error. I do have @include add-foundation-colors; in my settings file. I tried 6.7.0, 6.7.1 and 6.7.2 and all three failed with the same error. I reverted back to 6.6.3 and that works (as expected). Any idea what's going on? |
Beta Was this translation helpful? Give feedback.
-
In order to help, I need to be able to replicate the issue. No one has been able to provide me with anything that will allow me to replicate this. |
Beta Was this translation helpful? Give feedback.
-
I can send you my SCSS files that you can compile with 6.7.2 if that will help. Where do you want me to send them? |
Beta Was this translation helpful? Give feedback.
-
Joe, I emailed you my CSS files last night. Hopefully they will demonstrate the error for you. |
Beta Was this translation helpful? Give feedback.
-
I also open an issue for this now... #12278 |
Beta Was this translation helpful? Give feedback.
-
For me this issue is caused by those new lines in "foundation-sites/scss/util/_color.scss" (see #12080): ////
/// Patch to fix issue #12080
$primary-color: null;
$secondary-color: null;
$warning-color: null;
$alert-color: null;
$success-color:null;
//// I import "foundation-sites/scss/util/color" in files loaded after my "settings.scss" and "foundation-sites/scss/global" (which also includes This could probably be fixed by changing |
Beta Was this translation helpful? Give feedback.
-
6.7.3 has been released. I hope that it helps solve issues talked about here... https://github.com/foundation/foundation-sites/releases/tag/v6.7.3 |
Beta Was this translation helpful? Give feedback.
-
Been meaning to jump on and report that 6.7.3 did indeed resolve the issue for us. Thanks! |
Beta Was this translation helpful? Give feedback.
For me this issue is caused by those new lines in "foundation-sites/scss/util/_color.scss" (see #12080):
I import "foundation-sites/scss/util/color" in files loaded after my "settings.scss" and "foundation-sites/scss/global" (which also includes
add-foundation-colors
). Now the import overrides my colors and sets them all tonull
.This could probably be fixed by changing
null
tonull !default
.