Smarter And Better CSS For Ruby: LESS

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:

[sourcecode language=’css’]
@brand_color: #4D926F;
#header {
color: @brand_color;
}
h2 {
color: @brand_color;
}
[/sourcecode]

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

Search