I can style a whole app with only four hex values and SASS.
blog.12spokes.com
blog.12spokes.com
I'm yearning for a good Python-based implementation, ideally a drop-in with Django so I could use SASS files directly instead of Django templates, but nothing fully satisfactory has been produced yet (and I don't have the time to do it myself).
Please note: this is not intended as Ruby bashing, it's a perfectly fine language; it's just that I've practically never had a smooth experience with it.
Edit: Ah, and yes -- the author's job could be even easier if you used the Compass framework (specifically, it has a predefined helper for those gradients, and other stuff that are currently in a browser-prefix-hell): http://compass-style.org
See https://github.com/derekjw/scala-sass-compiler
I haven't actually used it yet though, so I can't comment on its quality.
https://github.com/richthegeek/phpsass
It's feature-complete up to 3.2, although there are a few bugs that still need to be ironed out (very rare to come across).
http://jaredforsyth.com/blog/2010/jun/17/clevercss-reloaded/
edit: in the readme there is even a django example.
CSS preprocessors sell themselves.
It's a pretty beastly stylesheet in the end, but it's a great method to learn/optimize for future projects.
http://learnboost.github.com/stylus/docs/bifs.html
Stylus is amazing
I've been able to completely replace SASS on Liferay [1] themes development and raised my team's productivity a lot.
I'm currently playing with a very, very small environment. I might want to check out a (powerful) css preprocessor project, but it feels wasteful to add a dependency on an otherwise unnecessary (for my work/projects) language. Alternatives? Suggestions?
This is one of the main reasons why foundations like Twitter Bootstrap or Compass are awesome but unfortunately people are so lazy they don't even change the color variables in Bootrstrap, hence the "yet another Twitter Bootstrap" site.
[1] Facebook had 706 CSS files, they declared the Facebook blue color 261 times, used 548 unique hex values for colors, had 6498 declarations of color. http://www.lukew.com/ff/entry.asp?1379
It's a lot easier when you think of colors as derivatives of a base color, rather than a collection of 7 different colors that have to be kept in sync.
http://workshop.chromeexperiments.com/examples/gui/#1--Basic...
That's what I was hoping to see when I saw this title, but it's just a proof-of-concept of styling a whole app.
Personally, while I do try to take advantage of all the features of LESS, I think the biggest thing is the ability to define macros (utilizing mixins or functions). Never again do I need to write multiple rules for one style (-moz-foo, -webkit-foo, and foo) or need to remember the complicated argument order (defining gradients is vastly different between all of them).
The cost is in introducing a compile step, but the benefit is that your stylesheet becomes easy to write, easy to read, easy to modify.
The math behind layouts can also be set using variables reducing a lot of headaches while the client wants 'the left column could be a bit wider'.
I agree that it requires a lot more coding discipline than plain 'ol CSS. So much to the extent that one would be tempted to abandon it. But like all good layers of abstractions, it reduces a lot of effort in the future.
Try out the SCSS syntax (or LESS), might warm you up to it a bit more.
In the end I find that if I organize my CSS well, changing things like colors really isn't such a big deal. Like you say. Find/Replace.
Oh well. Either it will pass as a fad or I will one day be forced into the light.
I strongly advocate giving the SCSS version a try. It's straight-up CSS with all the things that should have been there in the first place.
In the situations where a designer provided .psds for me to transform into html/css, no I haven't had to modify anything. But then, the iteration on the design happens with the other guy, and he does it in photoshop. If a change happens, he just sends me the new asset images, and I just replace them in the repo.
The times where I'm the one doing the design work, I end up switching things up a lot. This is because I don't do my design work in photoshop, but rather in the browser with actual html/css. So even while I'm iterating on something by myself (before having even shown the client anything), I'll switch colors up constantly trying to get something I'm okay with.
Rather than trying to remember a previous hex, or looking it up, you can think ok, this should be the darker highlight colour - and as you say, looking later you know which colour that is.
It's not just colours - a good example is a clearfix. Rather than add it to the markup, you can add it via css, and of course if you change it, you change it once.
The colours and mixins are a total winner too :)
Why use a preprocessor for HTML but not styles? Intentionally breaking development tools seems like a dead end, the only use-case I can imagine is client side manipulation; and then javascript has you covered by a huge legacy.
That does give you pretty good flexibility.. you have to pay a little more attention to caching compared to static (/compiled) .css files though.
By breaking existing tools I mean Firebug or whatever else is viewing the compiled styles.