Over a million developers have joined DZone.

Use Sass

Sass is a meta-language on top of CSS. 

Installation: Sass is part of Haml, which is available via git.  

gem install haml

Sass 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.css

Sample Usage (with variables)

// constants
!main_color = blue
!site_background = white 

  :color = !main_color
    :family verdana, arial, sans-serif
    :size 12px

Sass can calculate 

!color2 = !main_color*0.33 + !site_background*0.67 
!color3 = !main_color*0.67 + !site_background*0.33 

  :color = !color2
  :background_color = !color3

- 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.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}