基础变量和Mixins无法正常工作 [英] Foundation Variables and Mixins Not Working Correctly
本文介绍了基础变量和Mixins无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Bower上安装了 Foundation ,并且在我的gulp任务中包括了该路径,例如所以:
I have Foundation installed with Bower, and I'm including the path in my gulp task like so:
.pipe(sass({
includePaths: [
'bower_components/foundation/scss'
],
outputStyle: 'expanded'
})
当我@import 'foundation';
进入样式表时,它似乎可以正常工作.但是,当我开始引用其SASS变量或mixins时,我开始出现如下错误:
When I @import 'foundation';
into my stylesheet it seems to work fine. But when I start to reference its SASS variables or mixins I start getting errors like the one below:
Error: unbound variable $medium-up
知道为什么会这样吗?
提前谢谢!
推荐答案
您需要先@import 'foundation/settings';
在@import 'foundation';
之前.据我了解,您是主文件导入不包含设置.
You need to @import 'foundation/settings';
before @import 'foundation';
. As far as I can see, the main file that you are importing does not include settings.
Take a look at the app.scss section in this doc.
这篇关于基础变量和Mixins无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文