Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Re: Will CSS ever be programmable?
July 14, 2006, 1:57 pm
rate this thread
Re: Will CSS ever be programmable?
This would break down if he started with:
and he wanted to change it to his example. "Replace all" would change
his body border and h2 foreground to blue as well. Inspect/confirm S&R
would certainly save keystrokes, but it would have increased cognitive
load (have to determine, for every "red" you find, whether it was one of
the ones you wanted to change).
It's really the old issue of separating the *name* of something from its
*value*. We all, hopefully, know that CSS class names should reflect the
*purpose* of the class rather than its *appearance*, not just because it
lets us easily change them, but also because we might start out with two
or more areas with different purposes but the same appearance, and later
want them to have different appearances.
However, what the OP wants could easily be achieved by using any old text
preprocessor like m4.