ladybird/Tests/LibWeb/Layout/input/flex-baseline-block-overflow-hidden.html
Jelle Raaijmakers cf3bb8c129 LibWeb: Distinguish first and last baseline sets in box_baseline()
box_baseline() applied CSS2's bottom margin edge rule for non-visible
overflow to every caller, so flex items with hidden overflow were
baseline-aligned by their margin edge instead of their text. CSS Align
scopes that rule to a box's last baseline set, while flex baseline
alignment and table cells use the first set, which always derives from
content. Parameterize box_baseline() on the requested baseline set and
propagate it through the recursive child lookup.
2026-06-16 10:39:02 +02:00

40 lines
656 B
HTML

<!DOCTYPE html>
<style>
@font-face {
font-family: Ahem;
src: url("../../Ref/data/fonts/Ahem.ttf");
}
.row {
align-items: baseline;
display: flex;
font: 16px Ahem;
}
.icon {
background: black;
height: 16px;
width: 16px;
}
.text {
line-height: 24px;
overflow: hidden;
}
p {
margin: 0;
}
</style>
<div class="row">
<span class="icon"></span>
<span class="text">Text</span>
</div>
<div class="row">
<span class="icon"></span>
<span class="text" style="width: 64px">Text Text</span>
</div>
<div class="row">
<span class="icon"></span>
<div class="text"><p>Text</p><p>Text</p></div>
</div>