line-clamp-with-floats-009.tentative.html (833B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: line-clamp IFC with floats after the 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="If the line-clamp container is an independent formatting context, it will not clear any floats after the clamp point."> 8 <style> 9 .clamp { 10 display: flow-root; 11 line-clamp: 4; 12 font: 16px / 32px serif; 13 padding: 0 4px; 14 white-space: pre; 15 background-color: yellow; 16 } 17 .float { 18 float: left; 19 width: 50px; 20 height: 50px; 21 margin: 4px; 22 background-color: skyblue; 23 } 24 </style> 25 <div class="clamp">Line 1 26 Line 2 27 Line 3 28 Line 4 29 Line 5<div class="float"></div></div>