Incorrect TD baseline with empty TD, height, and border-collapse
Categories
(Core :: Layout: Tables, defect)
Tracking
()
People
(Reporter: mvdleij, Assigned: emilio)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Steps to reproduce:
See https://jsfiddle.net/s407w5Lc/ or the following html:
<head>
<style>
TABLE.collapse { border-collapse:collapse }
TR { vertical-align:baseline }
TD { border: 1px solid black }
TABLE.height TD { height: 30px }
</style>
</head><body>
<table class="collapse height">
<tr><td>ABCDE</td><td></td></tr>
</table>
</body>
Actual results:
The row in the table has an incorrect baseline. The text in the first cell appears too low and the bottom is cut off.
Expected results:
The row should have the same baseline as when the cell next to it is not empty, and as when border-collapse is not present on the table. That is, the row should look similar to the second and third table in https://jsfiddle.net/s407w5Lc/
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Tables' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
So... behavior here changed in bug 1923201, but before that patch it wasn't quite correct either (the table ended up taller than the expected 30px).
| Assignee | ||
Comment 4•1 year ago
|
||
This matches other browsers, and was kinda what was intended with the
content empty check and such, I believe.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 7•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Comment 9•1 year ago
|
||
Reproduced this issue on an affected Nightly build following the STR from Comment 0 on Ubuntu 22.04.
Verified as fixed on the latest Nightly 136.0a1 (20250109183505) and latest Beta 135.0b2 (20250108092002) using Windows 11, Ubuntu 22.04 and macOS 11.
Description
•