Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: If there are no breakpoints in the line that will fit the ellipsis, characters are removed off the end</title>
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
<link rel="stylesheet" href="/fonts/ahem.css">
<meta name="assert" content="If there are no possible soft wrap opportunities after which the block-ellipsis could be placed so that it fits in the line without overflowing, then characters are removed off the end of the line until it fits. This happens even inside text-wrap: pre.">
<style>
.rel {
position: relative;
font-family: Ahem;
line-height: 1;
font-size: 25px;
}
.bg {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100px;
background-color: red;
}
.test {
position: absolute;
top: 0;
left: 0;
width: 100px;
line-clamp: 4;
color: green;
white-space: pre;
}
.red { color: red; }
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.
<div class="rel">
<div class="bg"></div>
<div class="test">XXXX
XXXX
XXXX
XXX<span class="red">XX
XXXX</span></div>
</div>