出于某种原因,我在scss中使用变量时会得到这些误报,请参阅错误消息或截图(https://dha4w82d62smt.cloudfront.net/items/0D2t3G3a3U47060t3v44/Image%202018-02-28%20at%203.13.02%20PM.png?X-CloudApp-Visitor-Id=2833541&v=63ac4800)
[15:11:06] gulp-notify: [Error running Gulp] Error in plugin 'gulp-sass'
Message:
../../src/stylesheets/custom/style.scss
Error:
Undefined variable:
"$font-size-sm".
on line 2 of ../../src/stylesheets/custom/style.scss
>> font-size:
$font-size-sm;
-------------^
Details:
status:
1
file:
/Users/andreas/Coding/mittanbud/emg-styleguide/src/stylesheets/custom/style.scss
line:
2
column:
14
formatted:
我的目录结构是这样的:
/stylesheets/bootstrap
/stylesheets/custom/custom_variables.scss
/stylesheets/custom/style.scss
/stylesheets/app.scss
我的app.scss看起来像这样:
@import "custom/custom_variables";
@import "bootstrap/bootstrap";
@import "custom/style";
我想你需要先导入Bootstrap变量...
@import "bootstrap/variables";
@import "custom/custom_variables";
@import "bootstrap/bootstrap";
@import "custom/style";