Andrew Pollack's Blog

Technology, Family, Entertainment, Politics, and Random Noise

Config driven CSS websites in Domino - What do you tokenize?

By Andrew Pollack on 07/04/2008 at 01:58 PM EDT

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?


  • text bubble icon

    Security Review

    How secure is your Domino environment? A security review doesn't have to be expensive to be helpful. If you're interested in finding out more, Contact Me.
  • There are  - loading -  comments....



    Other Recent Stories...

    1. 09/04/2008If you could pick the topic you wanted from me at LS09, what would it be?Fall is here. Lotusphere 2009registration is open now, as is the call for abstracts. If you could pick my topic, what would you want me to cover? In the past, the Security Jumpstart I do with Gab has been very well attended with a repeat and both sessions really full, so we'll update that with all the new 8.5 stuff and submit that one for sure. Other than that, there's a ton of stuff I'm thinking about. Is there one you've seen me do that you think is worth repeating? Is there a new topic you think I ...... 
    2. 09/03/2008Trendspotting: What Google is really starting with ChromeAside from being a fairly cool -- if a bit undercooked -- new browser, Chome has another lesson for us. Google has very specifically NOT created an incremental bloatware version of existing code. They've built something new from nearly the ground up, embedding the proven technologies they needed -- javascript by V8, and rendering by Webkit. Only by starting from scratch were they able to get some of the size, memory management, and security enhancements that form the core of their promising new ...... 
    3. 09/03/2008Using the management of their campaigns to learn about the candidatesSome things about these two political campaigns have struck me recently as glimpses of what to expect from an administration led by either candidate. It isn't a perfect picture, but it is telling in a way. It also matches what I think about these two men so clearly my own viewpoint is mixed in richly in the interpretation. To be clear about that bias, I should state here that I am currently planning to vote for Obama, though will not vote an entirely Democratic party ticket. We have some very good ...... 
    4. 09/02/2008Chrome - Google's new Web Browser. Super tool, still needs a few things. 
    5. 08/30/2008Notes 8.5 Public Beta 2 - First impressions 
    6. 08/28/2008Have you used the Asus EEE PC? I've got a couple of unusual questions 
    7. 08/28/2008Blogging Respite - A long couple of weeks 
    8. 08/23/2008The disturbing case of the Fridge, and cabinets built by Dr. Seuess. * Updated with pictures 
    9. 08/17/2008From Caitlin: "Dad, are the Olympic medals solid gold?" The answer is interesting... 
    10. 08/12/2008The mis-use of Twitter as a chat room - and what to do about it 
    Click here for more articles.....


    pen icon Comment Entry
    Subject
    Your Name
    Homepage
    *Your Email
    * Your email address is required, but not displayed.
     
    Your thoughts....
     
    Remember Me  

    Please wait while your document is saved.