Archive for July 23rd, 2003
That would be nice

Simon Wilson has a nifty idea (though he’s not the first) about combining scripting and color in CSS3 with an eye to having color arrays, instead of defining umpty-nine separate instances of three different colors. It’s a neat idea. It’s not going to happen. Backwards compatibility is the biggest and most logical reason. (There’s a great discussion of this and more going on in the comments)

All I can do is sigh wistfully. Being able to define a color scheme in a concise array would clear up my biggest headache when I get the urge to re-skin the site. Namely, tracking down each and every instance of a particular color. This sounds simple, and search/replace takes care of most of the work, but there always a few classes/colors I forget about. (There are a few that only show up on three or four pages in the whole site.)

For a while, my (far less sexy) solution consisted of a style sheet that contained nothing but the color declarations for every class and id. This eventually became too combersome, especially when I wanted to change color and layout at the same time, so the color only sheet was scrapped. (I do still keep separate files for text formatting and layout/positioning)

But, for all the cool stuff that won’t be making it’s way into the CSS3 spec, there’s going to be a lot more that does survive. (Well, I hope) I can’t wait to start playing with it.

Filed under: Tech — July 23, 2003 10:21 am