You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<meta name="assert" content="If the block-ellipsis soft wrap opportunity is preceded by hangable whitespace, it is removed before placing the ellipsis.">
<style>
.clamp {
line-clamp: 1;
border: 1px solid black;
font-family: monospace;
margin-bottom: 1em;
/* The non-hanging text in the first line is 22 to 26ch, plus 1ch for the ellipsis. The hanging whitespace is extra 8ch */
width: 29ch;
}
.right {
text-align: right;
}
.justified {
text-align: justify;
}
.green {
color: green;
font-weight: bold;
}
.hangs {
white-space: pre-wrap;
background-color: red;
}
</style>
<p>Test passes if the text in the following blocks, including the ellipsis, is aligned to the proper
margin, and if they all have some green text and no red.</p>
<div class="clamp">
This text is <span class="green">left-aligned</span><span class="hangs"> </span>Clamped
</div>
<div class="clamp right">
This text is <span class="green">right-aligned</span><span class="hangs"> </span>Clamped
</div>
<div class="clamp justified">
This text is <span class="green">justified</span><span class="hangs"> </span>Clamped