Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Overflow: line-clamp auto with multiple dirty lines</title>
<link rel="match" href="reference/line-clamp-auto-051-ref.html">
<meta name="assert" content="Automatic line-clamp uses updated geometry of multiple dirty lines.">
<script src="/common/reftest-wait.js"></script>
<style>
.clamp {
line-clamp: auto;
max-height: 3lh;
font: 20px / 20px monospace;
width: 12ch;
background: yellow;
}
.line-box-sizer {
display: inline-block;
width: 1ch;
height: 1lh;
background: orange;
}
.final .line-box-sizer {
height: 2lh;
}
</style>
<div class="clamp">
<span class="line-box-sizer"></span>
Line 1<br>
<span class="line-box-sizer"></span>
Line 2<br>
Line 3<br>
Line 4
</div>
<script>
requestAnimationFrame(() => requestAnimationFrame(() => {
document.querySelector(".clamp").classList.add("final");
takeScreenshot();
}));
</script>