Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/line-clamp/line-clamp-balance-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS Overflow: `line-clamp` and text-wrap: balance</title>
<link rel="match" href="reference/line-clamp-balance-001-ref.html">
<meta name="assert" content="Checks that balancing happens after clamping, not before.">
<style>
.clamp {
line-clamp: 2;
font-family: monospace;
width: 8.1ch; /* the extra .1 is just in case the … character isn't perfectly monospaced. */
text-wrap: balance;
}
</style>
<p>Test passes if you see numbers up to 8 (and no further) below.
<div class="clamp">
1 2 3 4 5 6 7 8 9
</div>