This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Reported by Anton Prowse The baseline of an 'inline-table' is defined in 10.8.1 to be the baseline of the first row of the table. But what if it doesn't have any rows? We should probably define it to mean the bottom margin edge of the wrapper box in that case, to match the behaviour of 'inline-block'. Conversation begins: Bug description: http://lists.w3.org/Archives/Public/www-style/2011Mar/0637.html (#4) Acknowledgement: http://lists.w3.org/Archives/Public/www-style/2011Mar/0681.html
This bug is related to Bug 15891
This proposal would partially resolve Bug 15890
Browser compat info: Add a rowless table as the first item in an table cell, and see how the table cell's baseline is determined. According to 17.5.3: # 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. Experiments suggest that Firefox constructs an anonymous table-row and table-cell in the empty table (even though the algorithm in the spec wouldn't create any). It then aligns that row as specified. WebKit, on the other hand, skips over the row-less table when trying to determine a baseline for the cell. http://lists.w3.org/Archives/Public/www-style/2012Jul/0291.html
Can I see the testcase you used for comment 3?
(In reply to comment #4) > Can I see the testcase you used for comment 3? http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Ctable%3E%0A%20%3Ctr%3E%0A%20%20%3Ctd%20style%3D%22vertical-align%3A%20baseline%3B%20font-size%3A%20100px%3B%22%3Efoo%0A%20%20%3Ctd%20style%3D%22vertical-align%3A%20baseline%3B%22%3E%3Ctable%20style%3D%22width%3A%2050px%3B%20height%3A%2050px%3B%20background%3A%20green%3B%22%3E%3C%2Ftable%3Efoo%0A%3C%2Ftable%3E In Webkit, the two "foo"s have their baselines aligned. In Firefox, the first "foo"'s baseline is lined up with the bottom of the table.
Gecko does not have a table row there. It just treats the "first line baseline" as being always available from a table, which is probably just wrong per spec. File a bug, please? ;)
It's not wrong per spec, it's undefined. We can go either way. I'd prefer to have a no-row table produce a baseline, just like we've defined no-item flexboxes to produce a baseline.
Well, spec says to look for the first line box or table row, and that would be the "foo" here, when looking for the baseline of a cell. So it looks defined per spec to me. The baseline of an _inline_ table is indeed undefined. But that's somewhat orthogonal. Though obviously I would prefer it if we simply defined the baseline of tables and used it both places.... assuming the same baseline works in both cases. Note that for blocks we have different behavior for inline-block and block (last line vs first line).
Ah, so actually the test in Comment 3 and onwards isn't actually useful for observing if/how UAs determine the baseline of a table with no rows, since the baseline of a cell is specified to depend on descendant table rows but not on the table itself. And in any case, the baseline of a table isn't what we're interested in here anyway; it would have merely been an interesting data point. (Flexbox is the spec which cares about that, not CSS21.) This bug is about the baseline of an /inline/-table.