W3C home > Mailing lists > Public > www-style@w3.org > May 2004

Column Styles - CSS3 Proposal

From: Nicholas Shanks <contact@nickshanks.com>
Date: Wed, 12 May 2004 00:50:21 +0100
Message-Id: <F72EDE3D-A3A5-11D8-80CF-0005020F149E@nickshanks.com>
To: www-style@w3.org

Having been pointed to Ian Hixie's comments on table-column and 
table-column-group, and what the reasons are behind the current 
limitations, I would like to put forward this proposal for extending 
the inheritance model, and how it would apply to table-cell elements.

Any element can inherit from any other element according to the 
following list of relationships:

Pass Zero: (XHTML/HTML only)
- all elements are given their default properties.
- properties given in element attributes (style="...") are applied

Pass N: (N = 1 initially)
- element relationship list is (re-)constructed according to current 
style
- if there is no relationship N for the element, terminate inheritance 
processing
- elements inherit from the element matching relationship N.
- properties given in element attributes (style="...") are applied
- repeat for 'Pass N+1'


Inheritance relationships: (CSS-style specificity)

Element
1. parent

Element[display='table-column-group']
/* none */

Element[display='table-cell']
1. parent
2. parent.parent.getElementsByStyle('display', 
'table-column')[position()]


Psudo-function meanings:
getElementsByStyle() is like the DOM method getElementsByTagName(), 
returning an ordered NodeList
position() returns the position of the current element (identical to 
XPath function of the same name)
   the current element being of course ".", not 
"parent.parent.getElementsByStyle('display', 'table-column')"

Further relationships can be added as necessary, but for now this would 
just be used for tables :-)
Would this work, it looks implementable to me. Any comments?

- Nick.
Received on Tuesday, 11 May 2004 19:50:26 GMT

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