Re: [CSS2.1] col attributes: XHTML and CSS inconsistency?

On Dec 29, 2008, at 6:51 PM, Simetrical wrote:

> On Mon, Dec 29, 2008 at 9:35 PM, Brad Kemper <brad.kemper@gmail.com>  
> wrote:
>> Yes, the former. That the column number would refer to the  
>> intersection of
>> row and column prior to any rowspans or colspans, and that a TD  
>> that is not
>> written into the markup (because a rowspan or colspan takes its  
>> place) would
>> not match anything.
>> Thus, if the first TD was <TD colspan="2"> (absent any rowspans in  
>> this
>> example), then "td:nth-col(2)" would match nothing in that row.
>
> But the semantics of a colspan (rowspans are irrelevant AFAICT) are
> that the cell is in both columns, not just the first.

Is it? I tend to think of it as the first cell stretching across the  
second, and taking its place, but not BEING the second cell (the  
second column cell is missing, because the first column cell is taking  
its place, just like in the markup). It seems like it would be simpler  
that way too, if only one cell matched, unambiguously.

Rowspans are only irrelevant if they do not change what you consider  
to be the first cell in this scenario. Thus, if the first TD of the  
row above it had a rowspan, it would not change which TD you called  
the second column TD of the lower row. There would just be no matching  
TD:nth-col(1) on this lower row.



> Does it really
> make more sense to arbitrarily pick one of the columns it's in (the
> first) to style it with, or should it be styled as part of every
> column?  Of course, if you had rules like
>
> :nth-col(2) { color: red; }
> :nth-col(3) { color: green; }
>
> it's not possible for both to work if a cell crossed multiple columns,
> but the usual rules on conflicts would apply (green would win in this
> case, since it's later in the document order).

Received on Tuesday, 30 December 2008 03:07:31 UTC