This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17137 - Incorrect references to table box's containing block for sizing algorithms
Summary: Incorrect references to table box's containing block for sizing algorithms
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: PC Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 12:44 UTC by Anton P
Modified: 2012-12-04 00:54 UTC (History)
0 users

See Also:


Attachments

Description Anton P 2012-05-21 12:44:34 UTC
Reported by Anton Prowse

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.

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.

Assuming the general rules of 10.1, the containing block of a table box is the table wrapper box, despite the point of reference for percentage calculations.

In which case, the second sentence of the first paragraph of the quote from 17.5.2 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 itself.

Furthermore, 17.5.2.2 (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.

Conversation begins:
Bug description:
http://lists.w3.org/Archives/Public/www-style/2012Jan/1084.html