- From: L. David Baron <dbaron@dbaron.org>
- Date: Tue, 27 Nov 2012 17:39:39 -0800
- To: "Gérard Talbot" <www-style@gtalbot.org>
- Cc: W3C www-style mailing list <www-style@w3.org>
On Tuesday 2012-11-27 20:27 -0500, "Gérard Talbot" wrote: > Hello, > > http://www.gtalbot.org/BrowserBugsSection/css21testsuite/height-of-cell-001.html > > http://www.gtalbot.org/BrowserBugsSection/css21testsuite/height-of-cell-002.html > > http://www.gtalbot.org/BrowserBugsSection/css21testsuite/height-of-cell-003.html > > Firefox 17.0 and Firefox 20.0a1 (build 20121127) both display a 2in tall > black rectangle in all 3 tests. > > IE8, Chrome 23.0.1271.91, Opera 12.11 and Konqueror 4.9.3 all display a > 1in tall black square in all 3 tests. > > Why? > > " > 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. > (...) > In CSS 2.1, the height of a cell box is the minimum height required by the > content. The table cell's 'height' property can influence the height of > the row (see above), but it does not increase the height of the cell box. > " > 17.5.3 Table height algorithms > http://www.w3.org/TR/CSS21/tables.html#height-layout > > Here, the minimum height required by the cell content is 1.25em == 20px. > If heigth of cell is being set to 0.5in (48px), then why each cell do not > use only 48px? > > Firefox requires 80.5px which is even more odd. I think Firefox is wrong > in these 3 tests. You're correct. The spec used to be ambiguous, but it was clarified, and we haven't yet had a chance to update Firefox. That's https://bugzilla.mozilla.org/show_bug.cgi?id=569645 . I'd note, however, that browsers that don't implement baseline alignment for table cells wouldn't even face this issue at all (and would thus pass the test no matter what, basically). -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla http://www.mozilla.org/ 𝄂
Received on Wednesday, 28 November 2012 01:40:05 UTC