Hi, I am trying to organize my sass files into separate fragments of a project using GULP. However, when I import my mixins and variables into separate files:
File: variables.scss
//first import variables that might be used throughout all the other files @import "common/_variables.scss";
File: mixins.scss
Mixins @import "common/_mixins.scss";
Then try to access these mixins from other files, for example
File: buttons.scss @import "common / _buttons.scss";
When starting gulp sass:
The following errors occur:
throw er; // Unhandled 'error' event no mixin named 'foo' or undefined variable 'foo'
Although mixins / variable is defined in variable.scss and mixins.scss files. Thus, gulp aborts the task halfway, although no stylesheet is created.
Is there a rule in SASS that means variables and mixins should all be imported into the same files using them? If so, this is a problem, because I have many files that I would like to save separately, and I do not need to import both mixins and variables into them.
source share