Re: Styling table columns--why so limited?

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.
--Dan

Received on Tuesday, 30 March 2004 14:31:13 UTC