SASS is an amazing library to have in your toolbox. Here's a simple trick to make skinning your website drop dead easy...AND MAINTAINABLE!!
Let's start with a simple HAML page that includes a specific stylesheet depending on the user's current theme.
%html %head //dynamically write in whichever theme the user has configured = stylesheet_link_tag 'theme_default.css' %body hello world %p.fancy_text SASS is the bomb
Now, let's create the SASS file for the specific theme. We'll define all of our themeable properties as SASS variables, which will be used later on.
!textcolor = red
Can't get much simpler than that! Now, we'll define all of our themed elements and reference the variables declared in the specific theme file.
That's it! Now, anytime you want to create a new theme, simply create a new SASS file, declare your variables, and import the common include file! Here's a quick example...
!textcolor = blue @import themable.sass