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

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

From: Simetrical <simetrical@gmail.com>
Date: Tue, 30 Dec 2008 10:53:42 -0500
Message-ID: <7c2a12e20812300753y64cd99bav817d596be7abbe5c@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Brad Kemper" <brad.kemper@gmail.com>, "Boris Zbarsky" <bzbarsky@mit.edu>, fantasai <fantasai.lists@inkedblade.net>, "Rainer Ã…hlfors" <rahlfors@wildcatsoftware.net>, mongolie2006-w3c@yahoo.fr, "CSS mailiing list W3C" <www-style@w3.org>

On Tue, Dec 30, 2008 at 10:31 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> If :nth-col can apply the full range of styling (not just the standard
> 4 attributes), then why can't we just move this functionality into
> <col>?  Does the fact that it's a pseudoclass rather than a normal
> element allow you to defer the styling decisions somehow?  If it is at
> all possible I'd like to avoid introducing a new entity when there are
> existing ones begging to be enhanced.

That means that the HTML col element is magical on the CSS syntax
level.  "foo" in a selector means "match any element named foo", not
"match any element named foo unless 'foo' is 'col', in which case
apply special HTML-specific logic".

However, I don't see why :nth-col() is the most logical substitute for
HTML col functionality.  It seems like a feature more like the desired
functionality for col would be :col(), accepting a selector and
matching any cell that's semantically part of a col element that
matches the selector.  So for instance, in this table:

<table>
<col id="col1"> <col id="col2">
<tr><th id="cell1">Foo <th id="cell2">Bar
<tr><td id="cell3" colspan="2">Baz
<tr><td id="cell4">Quuz <td id="cell5">Quuuz
</table>

":col(#col1)" would be equivalent to "#cell1, #cell3, #cell4", and
":col(#col2)" would be equivalent to "#cell2, #cell3, #cell5".  This
is how attributes like align work in HTML4, AFAIK, which is what
people seem to want.

I assume that would be more difficult to do than :nth-col(), but not
insurmountable the way markup applied directly to col is.  The
advantage is, of course, that it would allow things like applying
rules to columns specified by classes without having to worry about
what position they're in in the particular table.
Received on Tuesday, 30 December 2008 15:54:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:18 GMT