Bug 15462 - Does auto-height table row height depend on padding+border of cells or just height?
Summary: Does auto-height table row height depend on padding+border of cells or just h...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
Depends on:
Reported: 2012-01-08 21:53 UTC by Anton P
Modified: 2012-12-04 00:51 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Anton P 2012-01-08 21:53:19 UTC
Reported by fantasai.

17.5.3 (Table height algorithms)
[http://www.w3.org/TR/CSS21/tables.html#height-layout] says:

  # The height of a 'table-row' element's box is calculated once the user agent
  # has all the cells in the row available: it is the maximum of the row's
  # computed 'height', the computed 'height' of each cell in the row, and the
  # minimum height (MIN) required by the cells. A 'height' value of 'auto' for
  # a 'table-row' means the row height used for layout is MIN.

Is 'height' on the table cell added to its border+padding and then applied as a minimum on the row, or is it directly applied to the row box?

Conversation begins: http://lists.w3.org/Archives/Public/www-style/2011Nov/0515.html

Bug description: http://lists.w3.org/Archives/Public/www-style/2011Nov/0750.html
Comment 1 Anton P 2012-01-08 21:53:48 UTC
It appears we do not have interop on this.

Gérard has written some tests to demonstrate:

He reports that Firefox 7+, Opera 11.52 and Konqueror 4.7.3 render no green in
height-cell-bc-separate (i.e. they apply the 'height' directly to the row box)
whereas IE8, IE9, Chrome 15.0.874.121 and Safari 5.1.1 render a green square
with thick black borders (i.e. they add the cell's border and padding to the
'height' to arrive at the minimum height it contributes to the row).

Source: http://lists.w3.org/Archives/Public/www-style/2011Nov/0750.html
Comment 2 Gérard Talbot 2012-01-09 17:25:30 UTC
I have a few other tests on all this; at minimum, this test should be added in this bug report.


Firefox 9.0.1, Opera 11.60 and Konqueror 4.7.4 render an 80px tall yellow square which seems to be the result of:

  20px  (minimum required by content of cell)
  60px (vertical padding specified for cell)

Chrome 16.0.912.75 render a 160px tall yellow rectangle which seems to be the result of:

  100px (specified height of cell box content)
   60px (vertical padding specified for cell)

Both results proceed from totally different logic and implementation.

I have not checked yet with IE8, IE9 and Safari 5.1.2 right now.

Comment 3 Gérard Talbot 2012-01-13 21:20:16 UTC
Test submitted at CSS2.1 test suite:


Bug report at bugzilla.mozilla.org on this:

Bug 295315 - table-cell height calculation uses border-box sizing; should use content-box