W3C home > Mailing lists > Public > www-style@w3.org > March 2000

TABLES: table-column elements will only be children of table-cells.

From: ament <ament@xs4all.nl>
Date: Wed, 14 Apr 1999 23:57:06 +0200
Message-Id: <3.0.5.32.19990414235706.007f0810@pop.xs4all.nl>
To: www-style@w3.org

Hi people!

I was digging through the tables section [CSS2;17]. I noticed some strange
CSS2-behaviour, explained in this email. Am I missing something? Am I
applying the rules the wrong way?

This email is about:
  1) rendering table-cells only for a table-column or table-column-group.
  2) applying rules at [CSS2;17.2.1]

lets say we have the following situation:

  <TABLE>
    <COL width="40%">
    <!-- column data here.. -->
  </TABLE>

and convert this to a tree:

  * display='table'
  '-* desplay='table-column'

According to the spec we should apply certain rules. [CSS2;17.2.1]
  (note: [CSS2;17.2.1] was overridden by [CSS2 errata;17.2.1]).

Applying the 1th rule of [CSS2 errata;17.2.1] -> nothing happens here.
Applying the 2nd rule of [CSS2 errata;17.2.1] -> nothing happens here.
Applying the 3rd rule of [CSS2 errata;17.2.1] ->
  nothing happens here, because the COL has a 'table'-parent.
Applying the 4th rule of [CSS2 errata;17.2.1] -> nothing happens here.
Applying the 5th rule of [CSS2 errata;17.2.1] ->

  <QUOTE>
  5. If a child T of a 'table' element (or 'inline-table') P is not a
'table-row-group', 'table-header-group', 'table-footer-group', or
'table-row' element, an object corresponding to a 'table-row' element will
be generated between P and T. This object spans all consecutive siblings of
T that are not 'table-row-group', 'table-header-group',
'table-footer-group', or 'table-row' elements. 
  </QUOTE>
  -> the new tree will be:

  * display='table'
  '-* desplay='table-row'  (newly added)
    '-* desplay='table-column'

Applying the 6th rule of [CSS2 errata;17.2.1] -> nothing happens here.
Applying the 7th rule of [CSS2 errata;17.2.1] -> nothing happens here.

  <QUOTE>
  7. If a child T of a 'table-row' element P is not a 'table-cell' element,
an object corresponding to a 'table-cell' element will be generated between
P and T. This object spans all consecutive siblings of T that are not
'table-cell' elements. 
  </QUOTE>
  -> the new tree will be:

  * display='table'
  '-* desplay='table-row'
    '-* desplay='table-cell'  (newly added)
      '-* desplay='table-column'

Now you can say 'hey, [9.10] says table column elements don't exist in a
document tree':

  <QUOTE>
  Note. The 'direction' property, when specified for table column elements,
is not inherited by cells in the column since columns don't exist in the
document tree. Thus, CSS cannot easily capture the "dir" attribute
inheritance rules described in [HTML40], section 11.3.2.1. 
  </QUOTE>

However this argument doesn't count, because there's one rule in [CSS2
errata;17.2.1] which is specially written for table-column elements. I'm
talking about rule #3.

It seems logical to me that the only rule that should consider creating
anounymous table boxes around 'table-column' would be [CSS2 errata;17.2.1]
rule #3. This would result in no modifications of the original
 example.

  <QUOTE>
  3. If the parent P of a 'table-column' element T is not a 'table',
'inline-table', or 'table-column-group' element, an object corresponding to
a 'table' element will be generated between P and T. This object will span
all consecutive siblings (in the document tree) of T that require a 'table'
parent: 'table-row', 'table-row-group', 'table-header-group',
'table-footer-group', 'table-column', 'table-column-group', and
'table-caption'. 
  </QUOTE>

greetings,

Mark Ament

----------------------------------------------------------------------------
---------------
[CSS2 errata]
http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html
Received on Tuesday, 14 March 2000 17:57:05 GMT

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