Smarter And Better CSS For Ruby: LESS
18
Jun
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.
To help understand better, here is an example:
@brand_color: #4D926F;
#header {
color: @brand_color;
}
h2 {
color: @brand_color;
}
LESS is well-documented & source can be found here.
- Tags:
Ruby
- Filed under: Design, Other License, Xhtml & Css
- 2 Comments























2 Responses for "Smarter And Better CSS For Ruby: LESS"
Nice… but it’s there is something better than this. Module HAML and SASS (in combination with Compass) for Ruby on Rails.
You don’t need this. You just use two or more class in the same div/tag; that one of that is for generic style