Join the DZone community and get the full member experience.Join For Free
Sass is a meta-language on top of CSS. Installation: Sass is part of Haml, which is available via git.
gem install hamlSass can be used with Ruby, Ruby on Rails or as a command-line tool. To run Sass from the command line
sass input.sass output.cssSample Usage (with variables)
// constants !main_color = blue !site_background = white body :color = !main_color :font :family verdana, arial, sans-serif :size 12pxSass can calculate
!color2 = !main_color*0.33 + !site_background*0.67 !color3 = !main_color*0.67 + !site_background*0.33 #box :color = !color2 :background_color = !color3Remarks: - Sass bzw. Haml Homepage: http://haml.hamptoncatlin.com/ - Sass and CSS cannot be mixed. Existing CSS has to be translated to Sass first. The commandline tool "css2sass" can help.
Sass (stylesheet language)
Opinions expressed by DZone contributors are their own.