- From: liorean <liorean@f2o.org>
- Date: Thu, 11 Mar 2004 15:51:52 -0500 (EST)
- To: "www-style@w3.org" <www-style@w3.org>
I had some thought about <http://ln.hixie.ch/?start=1070385285&count=1>,
and I was wondering if there is any specific reason why inheritance
should always be element based in css. I can think of a number of
different ways of specifying tables in XML, and none would provide any
reasonable element-based inheritance model. Take the following for example:
ASCII table:
+--+--+--+
| | |
+--+--+--+
| | |
+ + + +
| | |
+--+--+--+
Regular HTML way:
<table>
<tablecolumngroup>
<tablecolumn/>
<tablecolumn/>
<tablecolumn/>
</tablecolumngroup>
<tablerowgroup>
<tablerow>
<tablecell colspan="2"/>
<tablecell/>
</tablerow>
<tablerow>
<tablecell rowspan="2"/>
<tablecsll colspan="2" rowspan="2"/>
</tablerow>
<tablerow/>
</tablerowgroup>
</table>
Inverted HTML way:
<table>
<tablerowgroup>
<tablerow/>
<tablerow/>
<tablerow/>
</tablerowgroup>
<tablecolumngroup>
<tablecolumn>
<tablecell colspan="2"/>
<tablecell rowspan="2"/>
</tablecolumn>
<tablecolumn>
<tablecsll colspan="2" rowspan="2"/>
</tablecolumn>
<tablecolumn>
<tablecell/>
</tablecolumn>
</tablecolumngroup>
</table>
Grid-based way:
<table>
<tablerowgroup>
<tablerow/>
<tablerow/>
<tablerow/>
</tablerowgroup>
<tablecolumngroup>
<tablecolumn/>
<tablecolumn/>
<tablecolumn/>
</tablecolumngroup>
<tablecell colstart="1" rowstart="1" colend="2" rowend="1"/>
<tablecell colstart="3" rowstart="1" colend="3" rowend="1"/>
<tablecell colstart="2" rowstart="2" colend="3" rowend="3"/>
<tablecell colstart="1" rowstart="2" colend="1" rowend="3"/>
</table>
Now, how would one give those all a style so that they inherit in the
same way, dependent on their table placement rather than their parent
and ancestor elements?
I'd suggest making inheritance for tables based not on element nesting,
but instead specified by a css property, something like this:
property table-inheritance
values: none | [ table-row || table-column || table-row-group ||
table-column-group || table ]
initial: table-row table-row-group table-column table-column-group
table
applies to: ÔÇÿtable-cellÔÇÿ elements
inherited: no
percentages: N/A
media: visual
computed value: as specified
where 'table' is the closest table ancestor, including 'inline-table',
and 'table-row-group' includes 'table-header-group' and
'table-footer-group'.
Is this something that can be done without breaking any CSS design
constraints?
--
David "liorean" Andersson
ViewStyles, ViewScripts, SwitchStyles and GraphicsInfo bookmarklets:
<http://liorean.web-graphics.com/>
Hangouts:
<http://codingforums.com/> <http://yourmusicforums.com/>
Received on Friday, 12 March 2004 06:10:07 UTC