Foundation 中似乎存在一个较小的错误(甚至可能与全局变量的使用有关)。
这些警告/错误在较新版本的 Compass 和 SASS 中被抑制(显示的是来自旧版本 Sass/Compass 输出的错误日志)
DEPRECATION WARNING on line 270 of /bower_components/foundation/scss/foundation/components/_global.scss:
Assigning to global variable "$default-float" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$default-float: left !global" instead.
Note that this will be incompatible with Sass 3.2.
DEPRECATION WARNING on line 271 of /bower_components/foundation/scss/foundation/components/_global.scss:
Assigning to global variable "$opposite-direction" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$opposite-direction: right !global" instead.
Note that this will be incompatible with Sass 3.2.
DEPRECATION WARNING: The return value of index() will change from "false" to
"null" in future versions of Sass. For compatibility, avoid using "== false" on
the return value. For example, instead of "@if index(...) == false", just write
"@if not index(...)".
on line of /bower_components/foundation/scss/foundation/_functions.scss, in `exports'
from line 336 of /bower_components/foundation/scss/foundation/components/_global.scss
from line 5 of /bower_components/foundation/scss/foundation/components/_grid.scss
from line 9 of /bower_components/foundation/scss/foundation.scss
from line 9 of /resources/sass/screen.scss
DEPRECATION WARNING on line 13 of /bower_components/foundation/scss/foundation/_functions.scss:
Assigning to global variable "$modules" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$modules: append($modules, $name) !global" instead.
Note that this will be incompatible with Sass 3.2.
我采取的补救措施是为包含 Foundation 的项目创建 gemset,运行旧版本的 Compass 和 Sass 以缓解问题(此过程需要 RVM)
Gemfile(可以使用bundle init生成)
# A sample Gemfile
source "https://rubygems.org"
# gem "rails"
gem "sass", "3.3.14"
gem "compass", "1.0.0"
希望这能解决您的问题。
最好的
卢卡斯