Smarter And Better CSS For Ruby: LESS

Friday, June 19, 2009 11:55
Posted in category CSS, Development, Ruby On Rails

LESS is a Ruby gem which compiles the LESS code to CSS & extends css by adding variables, mixins, operations and nested rules.

It uses the existing CSS syntax. So, it is very easy to convert current CSS files to LESS files & there is almost no learning curve.

LESS For Ruby

To help understand better, here is an example:

1.@brand_color: #4D926F;
2.#header {
3. color: @brand_color;
5.h2 {
6. color: @brand_color;

LESS is well-documented & source can be found here.


Be Sociable, Share!
Father's Day Promo $40 OFF on ANY orrder
You can leave a response, or trackback from your own site.

Leave a Reply