Status: FAIL | Duration: 12ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-overflow/line-clamp/line-clamp-balance-008.html
<!DOCTYPE html> <html> <meta charset="utf-8"> <title>CSS Overflow: `line-clamp` and text-wrap: balance, height based, clamp caused by balance</title> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp"> <link rel="match" href="reference/line-clamp-balance-007-ref.html"> <meta name="assert" content="Checks that balancing after claming can cause clamping when working with height based clamping, even if there was no clamp point prior to balancing."> <style> .clamp { line-clamp: auto; font-family: monospace; width: 9.1ch; /* the extra .1 is just a bit of extra wiggle room, in case things aren't sized perfectly. */ line-height: 1; max-height: 4lh; text-wrap: balance; } span { font-size: 2em; } </style> <p>Test passes if you see numbers up to 3 (and no further) below. <div class="clamp"> 0 <div class=balance> 1 2 <span>3</span> <span>4</span> 5 6 </div> </div> <!-- Initially, we are limited to 4lh worth of content, which means we can fit all the content: first, 1lh in the parent div, then one line with some big numbers in the nested div, and a second one with only small ones. Then, when balancing, we move "4" to the second line, which makes it no longer fit, so that line gets clamped away. -->
/css/css-overflow/line-clamp/reference/line-clamp-balance-007-ref.html
<!DOCTYPE html> <html> <meta charset="utf-8"> <title>CSS Overflow: test reference</title> <style> .clamp { font-family: monospace; line-height: 1; } span { font-size: 2em; } </style> <p>Test passes if you see numbers up to 3 (and no further) below. <div class="clamp"> 0<br> 1 2 <span>3</span>… </div>