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

On Dec 29, 2008, at 6:02 PM, Boris Zbarsky wrote:

> Quoting Brad Kemper <brad.kemper@gmail.com>:
>
>> Still... presumably the UA knows what column a given cell is in  
>> (or  started in), in order to apply the COL properties that it  
>> does. If  "nth-child" is OK and not too burdensome for the UA, then  
>> what makes  "nth-col" (or nth-column) so much worse?
>
> It's not that much worse (though a good bit more expensive to  
> compute, due to
> having to get attributes and having to deal with rowspans).  Isn't  
> this what
> dbaron proposed be added?

Oh yes. Somehow I managed to miss dbaron's post altogether. Sorry. I  
do like his ideas in that.

> That still won't help if you do:
>
> td:nth-col(2), td:nth-col(3) { display: block; }
>
> since at that point the td:nth-col(4) will actually be in the third  
> column in
> the table.

Would it? The styling would change what was selected? I assumed it  
would refer to the column number of the markup.

> But that's the author's problem, of course.

I could like with that, as an author.

On Dec 29, 2008, at 6:06 PM, Garrett Smith wrote:
> One more thing: Color doesn't apply to columns - The only properties
> that do apply are border, background, width, and visibility.

But the whole range of styling possibilities would apply to td:nth- 
col(), if I am following this correctly. Right? That's kind of the  
whole idea?

On Dec 29, 2008, at 6:02 PM, Boris Zbarsky wrote:
>> If the first column TD of the row was a colspan (and not part of a   
>> rowspan), then nth-col(2) would be ignored. And if the first column  
>> TD  of the row was a in a rowspan and was not the first TD of the  
>> span,  then it would be ignored.
>
> Ignored meaning what?  That it wouldn't match nth-col(1), or that  
> the thing to
> its right would?  I assume you mean the former, and that the thing  
> to its right
> would not match nth-col(1) and would match nth-col(2)?

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.


>> It does not seem like this would make the  rendering harder
>
> It sure does, just not a huge amount.
>
>> and could be something that COL mapped to.
>
> This would need to be very carefully defined, but yes.

I suppose for backward compatibility, the only properties from COL  
that would map to it would be border, background, width, and  
visibility. Maybe that is what Garrett meant?


>
>
> -Boris
>

Received on Tuesday, 30 December 2008 02:36:41 UTC