Repeating CSS Class Specifications
One of the problems with CSS is in specifying elements that you'd like repeated in multiple classes — for instance, a color. Changing that color means you've got to change instances of that color.
I came across this Weblogsinc.com post about coding CSS so that you can specify a color (or anything else) once: Quick CSS color schemes.
Of course, this seems to require that you use both an id and a class in your HTML. What I'd like is a way to specify in the CSS file elements (e.g., colors) that can be referenced for classes and elements lower in the file. Making up some code to illustrate:
.acolor {color:#ff0000;}
h1 {+.acolor; font-size:20;}
I mean, talk about speedy CSS design; it's not a terrible thing to ask. But if such a thing were ever implemented, who knows what year any browsers (let alone all then-current browsers) would implement it?
Have your say ...
If this is your first comment, it will be held for moderation (but comments are appreciated). Otherwise, just be courteous, don't drop links unless highly pertinent — and no substituting keywords for your name. Posters must be 16 or older. We use Akismet, so if you don't see your non-spam comment posted, contact me.
