W3C home > Mailing lists > Public > www-style@w3.org > December 2008

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 29 Dec 2008 18:35:59 -0800
Cc: fantasai <fantasai.lists@inkedblade.net>, Rainer ┼hlfors <rahlfors@wildcatsoftware.net>, "Tab Atkins Jr." <jackalmage@gmail.com>, mongolie2006-w3c@yahoo.fr, CSS mailiing list W3C <www-style@w3.org>
Message-Id: <8BD245DC-D752-4BD3-9116-3C458F3B793F@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

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

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