【发布时间】:2013-08-01 07:38:42
【问题描述】:
使用 ruby compass gem 编译我的 SCSS 时收到错误消息。
run: /var/lib/gems/1.8/gems/compass-0.12.2/bin/compass compile
out: unchanged sass/partial/grid.scss
out: error sass/partial/catalog.scss (Line 5: Undefined variable: "$paragraphFont".)
out: create css/generated/partial/catalog.css
out: create css/generated/partial/base.css
out: overwrite css/generated/screen.css
我的screen.scss 像这样导入部分:
@import "partial/base";
@import "partial/catalog";
在我的base 部分中,我定义了$paragraphFont。
$paragraphFont: 'Lucida Sans', arial;
$regularFontSize: 14px;
在catalog.scss 我使用它:
.product-view #price-block {
p {
font-weight: normal;
font-family: $paragraphFont;
....
}
}
奇怪的是 css 编译得很好,$paragraphFont 被正确填充。所以我不知道为什么编译器会向我抱怨一个错误。
【问题讨论】:
-
你确定这个错误是正确的吗?我刚刚检查了这个,它工作正常,没有错误
-
这也是看时的问题,因为它会导致文件自己重新编译。
标签: sass