line-clamp-auto-040.html (804B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Overflow: `line-clamp: auto` zero-height div</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-auto-040-ref.html"> 8 <meta name="assert" content="Checks that the clamp point is after, rather than before, an non-empty div with zero-height, and that this results in the content of that div being retained and ellipsis being inserted on its the last line"> 9 <style> 10 .clamp { 11 line-clamp: auto; 12 max-height: 4lh; 13 background-color: yellow; 14 } 15 .zero { 16 height: 0; 17 } 18 </style> 19 <div class="clamp"> 20 Line 1<br> 21 Line 2<br> 22 Line 3<br> 23 Line 4<br> 24 <div class=zero> 25 Line 5<br> 26 Line 6 27 </div> 28 Line 7 29 </div>