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

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