1
0
Fork 0
firefox/testing/web-platform/tests/css/css-inline/text-box-trim/text-box-trim-line-clamp-auto-002.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

33 lines
990 B
HTML

<!DOCTYPE html>
<meta charset="UTF-8">
<title>text-box-trim applies to the last line before clamp when clamping by a height</title>
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-edge">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-trim">
<link rel="match" href="text-box-trim-line-clamp-auto-002-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
.spacer {
background: lightgray;
block-size: 100px;
}
.target {
font: 50px/2 Ahem;
text-box-trim: trim-end;
text-box-edge: text;
/* 385px will fit 4 lines if the last line has its end trimmed
* (4*100 - 25 = 375px), but it will fit 5 lines if all have their end trimmed
* (5*(100 - 25) = 375px). This tests that only the last line gets trimmed. */
line-clamp: auto;
max-height: 385px;
}
</style>
<div class="spacer"></div>
<div class="target">
A<br>
B<br>
C<br>
D<br>
E<br>
F</div>
<div class="spacer"></div>