Re: [CSS21] Issues with Ch.17 Tables

On 23/01/2012 23:40, Anton Prowse wrote:
> In addition to the items being discussed in contemporary posts, here are
> some more issues with the Tables chapter in CSS21.

Issue 7:

17.4 (Tables in the visual formatting model) says:
   # The width of the table wrapper box is the border-edge width of the
   # table box inside it, as described by section 17.5.2. Percentages on
   # 'width' and 'height' on the table are relative to the table wrapper
   # box's containing block, not the table wrapper box itself.

(Note that I don't see anything in 17.5.2 that describes the table 
wrapper box width, contrary to what it says above.)

17.5.2 (Table width algorithms) says:

   # Note that this section overrides the rules that apply to
   # calculating widths as described in section 10.3. In particular, if
   # the margins of a table are set to '0' and the width to 'auto', the
   # table will not automatically size to fill its containing block.
   # [...]
   # Future updates of CSS may introduce ways of making tables
   # automatically fit their containing blocks.

I believe the containing block of a table box is the table wrapper box, 
despite the percentage calculations thing.  In which case, the second 
sentence of the first paragraph of the preceding quote isn't helpful, 
though it's clear what point it's trying to make.  I guess if the table 
/were/ to automatically size to fill something, it would be to fill the 
table wrapper box's containing block, not to fill the table wrapper box 

Furthermore, (Automatic table layout) says:

   # Input to the automatic table layout must only include the width of
   # the containing block and the content of, and any CSS properties set
   # on, the table and any of its descendants.
   # [...]
   # [Second ordered list]
   # 2. If the 'table' or 'inline-table' element has 'width: auto', the
   # used width is the greater of the table's containing block width,
   # CAPMIN, and MIN.  However, if either CAPMIN or the maximum width
   # required by the columns plus cell spacing or borders (MAX) is less
   # than that of the containing block, use max(MAX, CAPMIN).

Again, it's the width of the containing block of the table wrapper box, 
not of the table box, that's important to this algorithm.

I think some editorial changes are needed here.

Anton Prowse

Received on Tuesday, 24 January 2012 22:02:51 UTC