rails 3.1 scss and where does compass fit in?
I am creating a new theme for my cms using scss. I am currently on rails 3.0.7 but am going to upgrade to 3.1 as soon as the the final is released so i can use the asset pipeline stuff.
My question is where does compass fit into开发者_Go百科 rails 3.1 ? is it still useful / needed?
Does it work with 3.1 ? Has anyone got any experience with this or any alternative?
thanks rick
If you only use compass to include files, then it is not necessary, but Compass is much more than that. Compass is a Framework that includes tested patterns for creating multi browser stylesheets. It also makes is extremely simple to create sprites.
For example:
.simple { @include border-radius(4px, 4px); }
will produce:
.simple {
-webkit-border-radius: 4px 4px;
-moz-border-radius: 4px / 4px;
-o-border-radius: 4px / 4px;
-ms-border-radius: 4px / 4px;
-khtml-border-radius: 4px / 4px;
border-radius: 4px / 4px;
}
If you are unclear of the value of Compass, I would recommend reading the guides.
Currently Compass is mostly supported by Rails 3.1.RC4 by adding the following gems:
gem "compass", :git => 'git://github.com/chriseppstein/compass.git', :branch => 'rails31'
gem 'sass-rails', :git => 'git://github.com/rails/sass-rails.git'
精彩评论