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

Re: Column text color

From: Chris Moschini <cmoschini@myrealbox.com>
Date: Thu, 11 Dec 2003 15:50:32 -0500
To: www-style@w3.org
Message-ID: <1071175832.8a06bb80cmoschini@myrealbox.com>

Matthew.van.Eerde@hbinc.com wrote:
> The discussion in a nutshell is "it would be nice if the working group came
> up with a provision to set a style on a column, but until they do we're not
> going to be able to change Mozilla's behavior"
> 
> I understand that certain styles can be set on the <col> element (visibility
> and such) but there are so many times that it would be useful to fully style
> a column that I wish the working group would come up with a mechanism for
> it.

Yes. This, from the Mozilla Bugzilla discussion, also clarifies things:

Comment #36 From Scott A. Colcord  2000-05-02 21:03
> I can see the difficulties with 'display', however there are many properties 
> (text-align, font, color, etc), that I can see authors wanting to apply on a 
> columnar basis fairly frequently.  It now sounds like there is no way to 
> accomplish this without breaking the 'HTML is not for presentation' rule.

So it seems the trouble is:

1) HTML is not for presentation, yet the COL element has no purpose but
presentation.

2) CSS is for presentation, but has no way of selecting a column except to select
a COL element - but that implies presentational HTML. An n-th-element selector on a
TD tag would cause undesirable results in a table that used colspans.


I don't think the COL element is the answer to this issue. It is presentation-only
and so ought to be deprecated. CSS ought to be modified to be able to select
columns.

The least drastic method is:

1) Modify nth-of-type( n ) selectors to account for colspan. That is, if I say
td:nth-of-type(3), then it counts 3 columns over in the Table, not 3 TD tags.
This is counter-intuitive only if you overthink the problem; at a glance it makes
perfect sense, and simple is good.

The more drastic method is:

2) Allow columns to be introduced explicitly via CSS, probably as a pseudo-class
- such as td:column( n ) - and let this pseudo-element do the proper counting that
accounts for colspan.

-Chris "SoopahMan" Moschini
http://hiveminds.info/
http://soopahman.com/
Received on Thursday, 11 December 2003 15:51:06 GMT

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