views:

40

answers:

1

I am trying to build a theme right now for the Spree eCommerce platform for Rails. Because Spree is already a fairly large project, it has chosen a certain set of patterns and frameworks for skinning: Less and YUI. But from reading around on Google, other skinners seem to work faster/better using other frameworks. So I am wondering what the pros and cons are of each so I can spend some quality time mastering one (preferably the one that gets me there the fastest).

Spree is using Less with YUI, while most of the blogs posters out there are choosing Sass and Blueprint (which you can use with Compass for automating css compilation).

What are the pros and cons of Less/YUI or Blueprint/Sass?

I would like to just learn and become efficient at one of them immediately so I don't have to split my time between both. I am not looking to use CSS without a framework.

Referencing a discussion on the Spree boards about Getting Started Creating Custom Themes.

+1  A: 

I can't really tell you the pros and cons of all of those, as I have not used them all myself. However, one thing I can offer is this:

Replacing HTML with something like HAML, or CSS with something like Sass, can be risky. If you do replace HTML with something else, you require that all future people who work on this project ALSO know HAML. In the case of something like Sass, while it more closely resembles CSS, it is still different enough to be confusing (even highly confusing) to someone not familiar with it.

If I had to choose, I would make a choice fundamentally rooted in maintainability and familiarity. That expands your pool of potential talent in the event you need more human resources, and reduces cost (people don't need to learn something new, and maintenance costs can be lower since you are using profoundly familiar technologies.) Given that, my choices would be Less and HTML. Less is VERY similar to CSS, and nicely blends in variables and mixins and the like without radically changing syntax. I wouldn't choose any alternative to HTML, as there are a zillion people who know it, and very few who know something like HAML or similar products.

jrista
how about blueprint vs. yui (or just grid defaults in general)?
viatropos
I would choose neither, to be honest. However, I may be a bit biased. I have been doing CSS for years, and I am very proficient at it. There was a time a few years ago when a coworker I mentored and I learned enough about CSS such that we didn't need any hacks to get IE 6, 7, FF, and Opera looking identical. That was with some very richly designed UI's as well. As such, I've always found CSS "frameworks" to be wasteful fluff that increased my download time. I would write the CSS you need to style your specific site directly. Using something like Less, you should be quite capable.
jrista
thanks for your advice, I'm brand new to css. this helps out a lot.
viatropos
You're welcome. :) Only other good piece of advice I can give you is research how to use CSS as much as you can. http://www.alistapart.com/ is a good resource to start with. You can waste a lot of time writing hacks for various browsers to solve little quirks. However, it is possible to write hackless CSS (or CSS that uses hacks VERY minimally) and get even richly graphic designed sites looking the same across browsers. If you understand CSS properly (there is really only one hump to get over), you can create some beautiful sites with very elegant and minimal CSS.
jrista