Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!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="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>