【发布时间】:2015-09-09 15:46:01
【问题描述】:
这是我的 main.scss 文件,其中包含我所有的导入。
/* Pages */
@import"pages/about";
@import"pages/contact";
@import"pages/home";
@import"pages/projects";
/* Partails */
@import "partials/gridmixins";
@import "partials/mixins";
@import "partials/colors";
@import "partials/typography";
/* Libs */
@import "bower_components/modular-scale/stylesheets/modular-scale";
@import "bower_components/normalize-scss/normalize";
现在假设我想在_home.scss 部分中使用modular-scale。我需要@import "bower_components/modular-scale/stylesheets/modular-scale";inside of _home.scss 吗?使用modular-scale 功能?
我很确定我是正确的,因为我之前尝试在_home.scss 中使用我的一些typography 变量,并引发了一个错误,即找不到我的变量。这是由于没有导入了我的 typography 部分。
如果我已经将要使用的文件导入main.scss,那么继续导入我想使用的文件似乎有点多余
【问题讨论】: