基础5:未定义的变量:“$ rem-base”

时间:2013-11-29 23:21:55

标签: sass zurb-foundation compass-sass

我刚刚安装了Foundation 5并用罗盘创建了一个新项目:

$ foundation new myproject && cd myproject && foundation update

为了修改我的专栏的排水沟,我在@import "foundation/functions";注释了$column-gutter_settings.scss

// Uncomment to use rem-calc() in your settings
@import "foundation/functions";

...

$column-gutter: rem-calc(30);

Compass说:

error scss/app.scss (Line 49 of scss/_settings.scss: Undefined variable: "$rem-base".

我还尝试使用libsass创建项目:

$ foundation new myproject --libsass && cd myproject && foundation update

然而grunt说:

Warning: bower_components/foundation/scss/foundation/functions:49: error: unbound variable $rem-base

我还应该做些什么?

1 个答案:

答案 0 :(得分:4)

如果你从github下载sass文件,4天前通过将$rem-base: 16px !default;添加到_functions.scss文件解决了这个问题: https://github.com/zurb/foundation/commit/3a48ef984309023b5b8c9c67fb4134a998728773

你有两个解决方案:

  • 从github下载最新版本的zurb-foundation:https://github.com/zurb/foundation/
  • $rem-base: 16px !default;
  • 之前将_settings.scss添加到@import "foundation/functions"文件