If cell lacks baseline, then it should be at the bottom of the content box, not border box.
Loirooriol opened this issue · comments
Oriol Brufau commented
https://drafts.csswg.org/css2/#height-layout
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.
If a row has no cell box aligned to its baseline, the baseline of that row is the bottom content edge of the lowest cell in the row.
<!DOCTYPE html>
a
<div style="display: inline-table; height: 100px; width: 100px">
<div style="display: table-cell; vertical-align: top; border: 25px solid magenta"></div>
</div>
b
<div style="display: inline-table; height: 100px; width: 100px">
<div style="display: table-cell; vertical-align: baseline; border: 25px solid magenta"></div>
</div>
Browser | Result | |
---|---|---|
❌ | Servo | |
❌ | Servo with #31831, WebKit |
|
✅ | Gecko, Blink |