line-clamp-with-floats-002.tentative.html (838B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: float at the start of a line-clamp</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-with-floats-001-ref.html"> 7 <meta name="assert" content="Floats in a block formatting context inside a line-clamp container are not hidden if they come before the clamp point."> 8 <style> 9 .clamp { 10 line-clamp: 4; 11 font: 16px / 32px serif; 12 padding: 0 4px; 13 background-color: yellow; 14 } 15 .float { 16 float: left; 17 width: 50px; 18 height: 50px; 19 margin: 4px; 20 background-color: skyblue; 21 } 22 .pre { 23 white-space: pre; 24 } 25 </style> 26 <div class="clamp"> 27 <div class="float"></div> 28 <div class="pre">Line 1 29 Line 2 30 Line 3 31 Line 4 32 Line 5</div> 33 </div>