line-clamp-balance-002.html (827B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Overflow: `line-clamp` and text-wrap: balance, nested</title> 5 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> 6 <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp"> 7 <link rel="match" href="reference/line-clamp-balance-002-ref.html"> 8 <meta name="assert" content="Checks that balancing happens after clamping, not before, including in nested blocks."> 9 <style> 10 .clamp { 11 line-clamp: 3; 12 font-family: monospace; 13 width: 8.1ch; /* the extra .1 is just in case the … character isn't perfectly monospaced. */ 14 } 15 .balance { 16 text-wrap: balance; 17 } 18 </style> 19 <p>Test passes if you see numbers up to 8 (and no further) below. 20 21 <div class="clamp"> 22 0 23 <div class=balance> 24 1 2 3 4 5 6 7 8 9 25 </div> 26 10 27 </div>