I'm soliciting ideas & best practices on building configurable "theme like" CSS for a Domino site. I'm in the midst of a design refresh for this blog, as well as the main NCT site. They are both functional but truly ugly. I've decided to merge the two into a much more integrated self -- but more on that later. As part of the redesign work, I've been hand crafting a bit of HTML and CSS that will eventually become the framework into which all the active content will be placed. Every time I do this, I try to come up with the best scheme for making the site easily updated with new colors and so on.
The whole point of CSS is that it makes up for the lack of tokenization in HTML. That is to say, there is no "Meta-Tag" that you can use for colors in html tags so that you can define your colors in one place. Instead of every table cell you want to be "red" having to have a color tag on the table cell tag, you define your table cells with a "class" and then you assign your colors and things there.
Great, now the bad news. CSS is one of long line of terrible standards created during the hype of the late 90's when foolish investors paid six figure salaries to 20 something year old CIS majors fresh out of university, gave them big offices, swimming pools, game rooms, and a bunch of equipment with the sole job of creating "something interesting".
CSS, designed to solve the problem of no tokenization in HTML, has no tokenization. You end up with long CSS files where the same color codes and file paths are repeated over and over, making updates painful.
We can get around that in Domino, by generating our pages on the fly. Other systems use external scripting to do the same thing. Where you would normally put a color tag, you might embed a token like ${MainBGcolor}. A scripting tool can then run and quickly replace all instances of that token in your template with the color you've assigned, and produce an output file containing your actual CSS. In Domino, instead of tokens we use <computed text&rt;.
All of these solutions talk about HOW you can tokenize your CSS ahead of time, but the better question is still "WHAT" do you tokenize and how? Colors are the obvious choice, background images? Icon images? What do you tokenize when you build your css?
Comment Entry |
Please wait while your document is saved.
CSS, are you correctly using the CASCADING aspect of it?
I can't think of a circumstance where I wished I'd had tokenization like that.
As I ponder it, it seems like I'd be over-classing and not using the
hierarchical nature of CSS if I did run into that problem.
Like.... why would you need to define MainBGColor in more than one place?
That's just the BODY {background-color: }
Even if you were looking to do individual cells or something, then it's just TD
{background-color:}