Compass vs Bourbon Frameworks [closed]
Asked Answered
H

3

27

Im working on a rails 3.1 application. I want to have a framework/library that covers gradients, shadows etc. Compass has been popular, but getting it to play nicely with rails 3.1 was a challenge for me, so I opted for Bourbon, which also seems to be getting popular. I am wondering what the main differences are between Compass and Bourbon. Or if there is a different framework that you use, please share that.

  • Why would you prefer one framework over the other?
  • Have you experienced with any of them compatibility issues with browsers or with versions of rails etc.?
  • Which one has a bigger or better library of mixins?
Hattie answered 5/10, 2011 at 19:25 Comment(3)
Have you seen the question What is the value of Compass with the accepted answer that mentions bourbon?Melanosis
Yes I have seen that, thanks!Hattie
Can you not include bourbon in a compass project? Similar to what I am doing to include susy: require "susy" (on second look, perhaps not exactly, there is probably some overlap...)Bartle
B
21

I had the same question and I researched it a bit more, installed both Compass and Bourbon and wound up with Bourbon, for the following reasons:

  1. Compass didn't cleanly install with Rails 3.1. It seemed a lot more invasive, needed configuration files (why?) and generally felt it had more dependencies to a specific way of doing things than just providing a CSS framework.
  2. Bourbon was super simple for Rails 3.1, and worked out of the box. The documentation was most straightforward, although I had to catch myself up on CSS3 box models first (which was easy to do--the top results on Google were right on the money). By contrast, I got lost in the Compass documentation right off the bat, and I wasn't sure what I needed and what not, there were so many pieces to it, I was afraid that it could take a long time to figure it out.
  3. Bourbon is a more recent development and seems to bank on CSS3 a lot. I would not give too much creed to one of the other answers that because Bourbon doesn't have as much activity yet it should be discarded. I have a feeling that Bourbon is the new vanguard and that it'll attract more activity as the more established Compass is losing activity. The new kid on the block isn't quite as popular at first, but that's a poor measure for long-term usefulness.
  4. If you can live without legacy browsers that don't do CSS3, then Bourbon is probably a good choice. For legacy support there are also various JS solutions available that teach the old browsers the necessary tricks.
  5. For the first time in many years as developer, Bourbon took away the fear of touching CSS. Try it with Flutie to get some basic layouts out of the box.
Bs answered 14/2, 2012 at 0:11 Comment(3)
Bourbon looks very intriguing. I too recently found Compass to be a pain in the rear to get working on rails 3.1. And Compass documentation is very lacking - at least on their website. If you have the time, you can dig through some of the missing pieces on github.Encomiast
For the record, Compass "just works (tm)" in Rails these days - all you need is a single @import in your main sheet, no config files. I haven't used Bourbon much but we use Compass in several large sites in production and I wouldn't code stylesheets without it!Fatherless
@Fatherless thanks for that update. Things evolve. It's been a while since I last looked at this and it's great to hear that Compass has caught up to "just work" now.Bs
A
18

So, I took a quick look at the Bourbon documentation and it looks like it's a much simpler, much smaller version of something like Compass. It's true that the most commonly used stuff in Compass is the CSS3 mixins but there's more to Compass than just that. In particular, I'd look at the spriting support and support for multiple elements like gradient backgrounds and box-shadows to see if that's something you'd like.

While Bourbon has the basics covered, there's some really nice edge cases that Compass takes care of. For instance, I often use the sticky-footer mixin.

Almaalmaata answered 10/2, 2012 at 18:32 Comment(0)
R
-18

Compass has a lot more traction and visibility. I've just asked on Twitter - nobody knew Bourbon.

Rotl answered 29/10, 2011 at 11:50 Comment(2)
Just because your friends don't know bourbon doesn't mean it's not valid. It's built by an outstanding company than has many, many popular projects.Grandfather
haha best ever!Leicestershire

© 2022 - 2024 — McMap. All rights reserved.