Foundation Variables and Mixins Not Working Correctly

心不动则不痛 提交于 2019-12-25 05:29:13

问题


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'
})

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

Any idea why this is happening?

Thanks in advance!


回答1:


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.




回答2:


the trick is to import settings.SCSS file in the bottom of global.scss. Works perfect for me



来源:https://stackoverflow.com/questions/29351726/foundation-variables-and-mixins-not-working-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!