Files
ladybird/Tests/LibWeb/Ref/expected/text-overflow.html
Jelle Raaijmakers c07e92fc7e LibWeb: Apply text-overflow ellipsis as line box post-processing
The previous implementation checked text-overflow and overflow-x
on the text node's direct parent during inline item iteration.
Since these are non-inherited properties, ellipsis only worked
for text directly inside the block container, not when wrapped
in inline elements like <span> or <a>.

Move ellipsis truncation to a post-processing step after line
boxes are constructed, checking the containing block instead.
2026-03-26 00:19:50 +00:00

22 lines
500 B
HTML

<!doctype html>
<style>
@font-face {
font-family: "Lato";
src: url("../../Assets/Lato-Bold.ttf");
}
div {
font: 16px/1 Lato;
overflow: hidden;
white-space: nowrap;
width: 75px;
}
</style>
<div>This text gets clipped</div>
<div>This text…</div>
<div style="width: 0px">Invisible</div>
<div style="width: 5px">a</div>
<div>This text…</div>
<div><a href="#">This text…</a></div>
<div><b>Bold</b> the…</div>
<div><span style="float: left">F</span>Text af…</div>