Proposal: adding CSS to hypermail

From: <jose.kahan_at_w3.org_at_hypermail-project.org>
Date: Fri, 17 Dec 1999 02:26:42 +0100 (MET)
Message-Id: <199912170126.CAA09131_at_tuvalu.inrialpes.fr>


In a recent version, Kent changed the <HR> to <HR NOSHADE>. It looks good to me, but maybe someone else would like to use <HR WIDTH=400> or put it purple or right aligned...

Kent's change was hardcoded into the code. If you want to make some style change yourself, you'd need to program it yourself and compile everything again before being able to test it.

Today, some changes can be user controlled, like when defining the color thru the xxx option, or inserting a custom HTML header to each document.

Moreover, more style changes will happen

What I propose is that we use Cascading Style Sheets (CSS) [1] to do these style chages. CSS are used together with HTML documents. Where HTML gives the organization and semantics of the document and CSS gives the presentation style of the document.

CSS rules can be stored in the <HEAD> of the document or, alternatively, can be stored in an external file, linked to the HTML documents thru HTML LINK tags, such as:

 <LINK rel="stylesheet" href="main.css">

Here main.css is an external stylesheet. This is very powerful. For example, if a set of documents were linked to main.css as shown here above and I'd like to change all the headers to be red, I just need to add a CSS rule in main.css saying:

H1 { color:red }

The change will be effective next time someone browses any of the documents (not talking about caches right now). As you can see, I didn't even need to modify the HTML documents to change their style.

Linking to external CSS will allow us to change the style of the HTML archives without regenerating them. This is already a good reason to adopt them, in my opinion.

There are many things we could do with CSS, as we can define classes and say precisely where we want to apply them, using DIV and SPAN HTML 4.0 tags.

Now, you must be wondering, why I'm losing my time with all this blurb and what I want to sell you...

What I'd like to do now is to add two new configuration options to Hypermail so that you can link CSS to the indexes and to the messages. I propose two options, so that we can differentiate between index and messages CSS.

All these options will do is to add a LINK element if they're active.

This will already give people more freedom to choose the style of their documents, if they choose to do so.

In the long term, we can see how to organize the structure of the indexes and messages so that CSS can be better exploited. Right now, they'd allow to control the style of the HTML tags that area already there.

What browsers support them? IE, Opera, and NS, alas, not all at the same lever, but much of the functionality. The situation is improving every day, though. If your browser doesn't understand CSS, it won't follow the link and no harm will be done.

What do you think?

This is a very simple patch to add to hypermail and I'd like it to be in 2.0. It won't fragilize the code.

If I don't hear any objection, I'll add it tomorrow.

-Jose



[1] http://www.w3.org/Style/ Received on Fri 17 Dec 1999 03:27:26 AM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT