Re: [CSS2] More on tables

On Mon, 9 Feb 2004, fantasai wrote:
>
> http://www.w3.org/TR/CSS21/tables.html#q7
>
>    # A column box occupies **one or more columns** of grid cells.
>    # Column boxes are placed next to each other in the order
>    # they occur. The first column box may be either on the
>    # left or on the right, depending on the value of the
>    # 'direction' property of the table.
>
> Each column box should only encompass _one_ column. The source document
> may use a single element to represent a sequence of several columns as
> in HTML, but this element represents, however, multiple individual
> columns and not a grouping of columns. CSS properties should therefore
> apply to each of those columns individually, as the 'width' attribute is
> in HTML.

There are two issues here.

First, can a column box span multiple columns. There is no reason why this
should not be the case, as far as I can see. One could imagine in CSS3
having:

   mycolumn { display: table-column; col-span: 2; }

...be meaningful.

The second issue is whether it is possible to represent <col span="">
using CSS and display:table-column. It would appear to me that it is not,
based on the current wording of the spec (it would take several changes to
make it possible). I would suggest using a technology such as XBL or the
multiple ::before pseudo idea from CSS3 to map one element to multiple
separate boxes in this manner.

(CSS really needs easy on-the-fly transformation for this kind of stuff,
but that's another story.)


> WinIE, Opera, and Mozilla all seem to follow this interpretation.
> (Opera and Mozilla respect borders, WinIE and Mozilla respect width.)

WinIE doesn't support table-column, Opera and Mozilla both have hard-coded
ways of interpreting properties on <col>. There is no current way to test
if a UA actually supports what the spec says or not, since there is no
way to specify how many columns cell and column boxes should span.


> Unseen Rows
> ===========
>
>    http://www.w3.org/TR/CSS21/tables.html#empty-cells
>
>    # A value of 'hide' means that no borders or backgrounds are
>    # drawn around/behind empty cells (see point 6 in 17.5.1).
>    # Furthermore, if all the cells in a row have a value of 'hide'
>    # and have no visible content, the entire row behaves as if it
>    # had 'display: none'.
>
> The entire row should behave as if it had 'visibility: collapse'.
> Simple reason why: cells in a row with 'visibility: collapse'
> still affect column widths, and cells in a row with "empty-cells:
> hide" should, too.

Why? The only reason visibility:collapse cell still affect layout is for
optimisation, as I understand it. In the empty-cells case, it doesn't
apply, since the change won't be done dynamically in the same way.


> WinIE, Opera, and Mozilla all have this interpretation.

They should be fixed.

If UAs don't implement this right, the spec will have to change before
exiting CR.


> Border-Collapse Border-Box Dimensions
> =====================================
>
> The problems with collapsed outer table borders noted in
>    http://lists.w3.org/Archives/Public/www-style/2003Mar/0003.html
> don't seem to have been addressed by the last draft.
>
> I'd like to note that this problem *has* to be addressed by
> incorporating the outer border into the margin space, not the
> border space or the overflow. Otherwise, you get some really
> awful renderings. See
>    http://fantasai.inkedblade.net/style/demos/border-collapse-overflow/
> for a demonstration.

This seems to just be a browser bug. The backgrounds shouldn't spill
outside the table edge. I suppose this might result in an irregular
background clipping rectangle.

Again, if UAs don't implement this right, the spec will have to change
before exiting CR.


> There seem to be no provisions for allowing the UA to generate
> anonymous row groups to contain rows directly inside a table.

This has been fixed, I think.

Cheers,
-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 9 February 2004 14:09:40 UTC