line-clamp-auto-020.tentative.html (865B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: `line-clamp: auto` with the clamp point in a descendant with bmp</title> 4 <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp"> 6 <link rel="match" href="reference/line-clamp-auto-020-ref.html"> 7 <meta name="assert" content="If line-clamp: auto has the clamp point in a descendant, it should take its bmp into account"> 8 <style> 9 .clamp { 10 line-clamp: auto; 11 max-height: 6lh; 12 font: 16px / 32px serif; 13 white-space: pre; 14 background-color: yellow; 15 } 16 .clamp > div { 17 /* The total block-size bpm across the top and bottom is 2*(15+2) = 34px, greater than the line-height */ 18 padding: 15px; 19 border: 2px solid black; 20 } 21 </style> 22 <div class="clamp"><div>Line 1 23 Line 2 24 Line 3 25 Line 4 26 Line 5 27 Line 6</div></div>