ladybird/Tests/LibWeb/Layout/input/table/vertical-align-baseline.html
Aliaksandr Kalenik 7b75d0c1f0 LibWeb: Fix height distribution in "vertical-align: baseline" in TFC
This line changes padding top to align cell content to baseline:
`cell.padding_top += m_rows[cell.row_index].baseline - cell.baseline`

Which means available for distribution height `height_diff` could have
changed so it needs to be refreshed before assigning the rest of it to
padding bottom:
`cell_state.padding_bottom += height_diff;`

Fixes https://github.com/SerenityOS/serenity/issues/22032
2024-04-19 10:55:28 +02:00

20 lines
353 B
HTML

<!DOCTYPE html>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
td {
vertical-align: baseline;
font-size: 40px;
}
.small-text {
font-size: 10px;
}
</style>
<table>
<tr><td>Text baseline</td><td class="small-text">Smaller text</td></tr>
<tr><td>Another baseline</td><td>Regular text</td></tr>
</table>