Compass for Rails 3.1的价值是什么? [英] What is the value of Compass for Rails 3.1?

查看:87
本文介绍了Compass for Rails 3.1的价值是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定在启动广告时是否应包含 指南针 新的 Rails 3.1 项目。我以前从未使用过Compass。



Rails 3.1现在直接支持SCSS。 Rails 3.1资产管道(通过链轮)现在可以自动编译样式表。而且我可以直接使用SCSS版本的CSS框架,例如Blueprint。



将Compass与Rails 3.1结合使用会带来什么好处?

解决方案

波旁语(由Thoughtbot提供)是可与Rails 3.1很好集成的指南针的轻巧替代品。



它具有指南针提供的主要css3 mixins(背景图像,框阴影,边框半径,渐变...)。它还提供了样式按钮的帮助器,布局化您的布局以及其他一些好东西。用sass的力量克服:只需复制/创建自己的mixin!



在升级我的Rails应用程序时,指南针经常让我头疼。我感谢波旁威士忌的简单性(尽管它也可能使您头痛…………)


I'm trying to decide if I should include Compass when starting a new Rails 3.1 project. I haven't used Compass before.

Rails 3.1 now supports SCSS directly. The Rails 3.1 asset pipeline (via sprockets) now compiles stylesheets automatically. And I can use a SCSS version of a CSS framework such as Blueprint directly.

What benefits will I get from using Compass with Rails 3.1?

解决方案

Bourbon (by Thoughtbot) is a light alternative to compass that integrates well with rails 3.1.

It has the main css3 mixins you get with compass (background-images, box shadow, border radius, gradients...). It also has helpers to style buttons, "gridify" your layout and a few more goodies.

You might miss some of the power features compass has, but that can be easily overcome with the power of sass : just copy/create you're own mixin!

Compass often gave me headaches when upgrading my rails app. I appreciate the simplicty of Bourbon (although it might give you headaches as well... in the morning :-) )

这篇关于Compass for Rails 3.1的价值是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆