运行bundle exec jekyll serve
后,我收到错误
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
Undefined variable: "$grey-color". on line 17
在我的main.scss文件中,定义了$ gray-color
--- snip ---
$grey-color: #37474F;
$grey-color-light: #fefefe;
$grey-color-dark: #5e5e5e;
--- snip ---
/ Import partials from `sass_dir` (defaults to `_sass`)
@import
"base",
"cards",
--- snip ---
并在文件的底部,从_sass文件夹导入_base.scss,它在第17行出错background-color: $grey-color;
我知道它出错了,因为如果我将其更改为十六进制颜色(例如#FFFFFF)它在下一个变量用法时出错。
为什么我的导入无法访问main.scss中定义的变量?