此故障由Sass版本引起。
总之,不能在Foundation 5中使用Sass 3.4.x版。否则,当键入compass compile
command并导致编译失败时,我们将从终端收到警告。
我们应该使用Bundler来避免这种情况。
如果使用Bundler,我们可以控制每个项目的Sass版本。伟大的!
我试图用Bower覆盖Middleman中Foundation的变量。
很快,我用凉亭安装了Foundation。
bower install foundation
基础安装在bower_components
目录中。
接下来,我在Middleman中编写了以下代码以在config.rb
中导入基础资源all.sass
。
after_configuration do
sprockets.append_path "#{root}/bower_components/"
end
最后,我找到了以下文章,并尝试了它。
http://forum.ionicframework.com/t/override-scss-variables/966/3
我在下面的代码中写了 all.sass
$font-family-sans-serif: Verdana, "游ゴシック", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif
@import 'foundation'
上面的代码无法正常工作。在浏览器中未更改字体系列。
我想与Bower保持干净的安装资源。因为可能在我键入bower update
命令时删除了。
有什么好办法吗?
您正在使用哪个版本的Sass?尝试将!global
标志添加到变量定义中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句