RE: [css 2.2] [tables] Baseline on empty table cells

> Hi there,
> We've hit a bug in Blink while trying to confirm to  http://test.csswg.org/harness/test/css21_dev/single/inline-table-valign-002/. It comes down to what height we should give the second cell box in: 
> <!DOCTYPE html> <style> .cell{ height:453px; vertical-align: baseline; } </style> <table> <td class="cell"> crbug.com/513319: An empty cell even if it has height should set the baseline for the row. This text should be at the top of the page. </td> <td class="cell"> </td> </table>
> Everyone gives it a height of 453px but only FF and Blink currently put the baseline on the bottom of the cell. (If you put an empty <div> in the second cell then FF puts the baseline at the top (i.e. below top border and padding). I'm guessing it does this because the empty div has an empty linebox.)
> Turning to the spec: "The baseline of a cell is the baseline of the first in-flow line box in the cell, or the first in-flow table-row in the cell, whichever comes first. If there is no such line box or table-row, the baseline is the bottom of content edge of the cell box." So with a height of 453px, it looks like the baseline should be down at the bottom of the cell like Blink and FF do.
> But it's very hard to get away from : "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." (This is a recentish addition, https://lists.w3.org/Archives/Public/www-style/2010Jun/0048.html)
> Accepting that the bottom content edge of the cell is not determined by the computed height of the cell means that http://test.csswg.org/harness/test/css21_dev/single/inline-table-valign-002/ is wrong. It looks like that test and FF (and us until we revert) are wrong. 
> Is there something I'm missing?

I brought this issue up a while back: https://lists.w3.org/Archives/Public/www-style/2014Jun/0144.html


Here's my basic testcase that prompted the change: http://jsfiddle.net/grjL5/


We had implemented this (you can see it in IE11) but made the switch for web compat so I suggest not switching to this as we now have interop between Edge/Blink/Gecko/Webkit

Greg

Received on Monday, 3 August 2015 16:29:25 UTC