line-clamp-auto-014.html (725B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: `min-height` greater than `max-height` with `line-clamp: auto`</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/webkit-line-clamp-005-ref.html"> 7 <meta name="assert" content="The block size constraint used for line-clamp: auto is the maximum of min-height and max-height"> 8 <style> 9 .clamp { 10 line-clamp: auto; 11 min-height: 4lh; 12 max-height: 3lh; 13 font: 16px / 32px serif; 14 white-space: pre; 15 padding: 0 4px; 16 background-color: yellow; 17 } 18 </style> 19 <div class="clamp">Line 1 20 Line 2 21 Line 3 22 Line 4 23 Line 5 24 Line 6</div>