W3C home > Mailing lists > Public > www-style@w3.org > March 2004

Re: Styling table columns--why so limited?

From: Dan Delaney <dan1@fluidmind.org>
Date: Tue, 30 Mar 2004 14:30:39 -0500
Message-ID: <4069CADF.3080000@fluidmind.org>
To: www-style@w3.org

Bernd wrote:
> Please read: http://ln.hixie.ch/?start=1070385285&count=1

Thanks Bernd (and Boris) for that link. That's exactly what I was 
looking for.

I do have a question about it. The steps were outlined as such:

 > 1. Parse the stylesheets and the document.
 > 2. For each element in the document:
 >    1. Decide which CSS rules apply.
 >    2. Perform the CSS cascade with those rules.
 >    3. Perform inheritance of properties if the result of the
 >       cascade is the keyword 'inherit' (or no specified value
 >       for inherited properties).
 >    4. Perform computations (turn 'em's into 'px's, etc).
 >       According to CSS2.1, the getComputedStyle() DOM  method
 >       returns these values. At this point, every element has a
 >       value for every property  ('display', 'color', etc).
 > 3. Lay out the document.
 > 4. Paint the document.

And then he explains it as such:

> the exact relationship between a cell and a column can only be
 > calculated when laying out the document, since you have to take
 > into account what cells span several columns, etc. So you know
 > which cell is in which column during stage 3, and not earlier.
 > But the stage where you would work out what the color property
 > of a cell is step 2! And at this stage, you don't yet know which
 > column applies to which cell, so you can't go and ask the column
 > for the value."

I can see how width and visibility would be determined during the 
layout stage. But how is it that border and background /can/ be 
determined during stage 3 but color, font-weight, text-align, et.al. 
cannot? Wouldn't you need to know which cell applies to which column 
in order to know what background-color to apply to it?

I'm not trying to be confrontaional. I'm just trying to understand. 
It's just that the col and colgroup tags serve such little purpose 
at this point that it seems like they may as well not even be there. 
If you have to asign a class to every td tag for a column to be 
right justified or bold or whatever, then what's the point of even 
having col and colgroup--what added purpose do they serve?

Thanks a lot.
Received on Tuesday, 30 March 2004 14:31:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:12 UTC