line-clamp-with-floats-004.tentative.html (849B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: float in line-clamp after clamp point</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="Floats in a block formatting context inside a line-clamp container are always hidden if they come after 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="pre">Line 1 28 Line 2 29 Line 3 30 Line 4</div> 31 <div class="float"></div> 32 <div>Line 5</div> 33 </div>