I was trying to do this and found these two links very helpful:
Had an idea to make a CSS preprocessor that would help solve many of the issues I have with CSS currently. Ideally it would:
Allow nesting of styles
Being able to nest styles ‘inside’ other styles would solve the problem of writing out tons of selector chains.
Automatically insert necessary attributes
For IE and other browsers. IE: automatically add ‘cursor:hand’ whenever ‘cursor:pointer’ is seen. Could also add the IE-specific opacity property
Allow use of variables
It’d be great to be able to reference a color by variable in multiple styles instead of having to update multiple styles when the color changes.
Looks like someone had a similar idea (but currently only does variables).
After taking a little break from work this weekend and learning the wonders of CSS I’ve decided to redesign the site from the evil, iframe-using, image-based junk that it previously was. The power and cleanliness of CSS is perfect; I don’t know how I had been designing without it!