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: Mon, 29 Dec 2008 21:51:45 -0500
Message-ID: <7c2a12e20812291851h74d14eeds849fa30f21e68cf9@mail.gmail.com>
To: "Brad Kemper" <brad.kemper@gmail.com>
Cc: "Boris Zbarsky" <bzbarsky@mit.edu>, 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>

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.  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 02:52:21 UTC

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