W3C home > Mailing lists > Public > www-style@w3.org > July 2005

Proposal: :column pseudo-class

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Sat, 02 Jul 2005 15:30:33 +0200
Message-ID: <42C696F9.8040304@students.cs.uu.nl>
To: www-style@w3.org

I hereby propose a :column pseudo-class, which I think would be the best 
possible way to resolve the problem that it is currently impossible to 
reliably select a column.

The current disadvantages:
- :nth-child can be used, but it doesn’t take colspan into account.
- It is not possible to select a column independantly on index, based on 
e.g. a class.

Proposal: :column pseudo-class

The :column pseudo-class is effective on elements with ‘display’ type 
‘table-cell’ or ‘table-column’ or ‘table-column-group’ only. It selects 
all the elements with the ‘display’ type ‘table-cell’ inside the same 
table that *follow* the element the pseudo-class is applied to, 
including the element itself. This selection includes :column cells that 
span the column with a colspan.

To avoid circular references, there is the following restriction: any 
‘display’ properties set on the element that is selected by the :column 
selector is ignored (and remains table-cell). For example:

1. .cities:column { display: block }
2. .cities:column a { display: block }

In example no. 1, the display property is ignored. In example no. 2, the 
display applies as usual.

Question: should :column select itself as well?

Similarly, a :row could be introduced to alleviate problems with rowspan.


Ushiko-san! Kimi wa doushite, Ushiko-san!!
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.
Received on Saturday, 2 July 2005 13:30:41 UTC

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