如何让 Rails 3.1 使用 SASS(Over SCSS)作为默认值? [英] How to make Rails 3.1 use SASS (Over SCSS) as the default?
本文介绍了如何让 Rails 3.1 使用 SASS(Over SCSS)作为默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
很难弄清楚如何将 SASS 而不是 SCSS 作为样式表的默认设置.
Having a hard time figuring out how to make SASS, not SCSS, as the default for stylesheets.
我试过用这个制作 sass_config.rb
文件:
I've tried making a sass_config.rb
file with this:
Sass::Plugin.options[:syntax] = :sass
Sass::Plugin.options[:style] = :compressed
我也尝试将其添加到 environment.rb 文件中.无论哪种方式,我都会收到此错误:
I've also tried adding that to the environment.rb file. Either way I get this error:
.../config/environment.rb:7:in `<top (required)>':
uninitialized constant Sass::Plugin (NameError)
推荐答案
对于 rails 3.1.rc4,你可以设置配置:
For rails 3.1.rc4, you could set the config:
config.sass.preferred_syntax = :sass
在 application.rb
文件中
这篇关于如何让 Rails 3.1 使用 SASS(Over SCSS)作为默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文