webkit-line-clamp-025.html (904B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: -webkit-line-clamp with floats</title> 4 <link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au"> 5 <link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp"> 6 <link rel="match" href="reference/webkit-line-clamp-025-ref.html"> 7 <meta name="assert" content="A -webkit-line-clamp induced ellipsis is placed after shrinking the line due to floats."> 8 <style> 9 .clamp { 10 display: -webkit-box; 11 -webkit-box-orient: vertical; 12 -webkit-line-clamp: 1; 13 font: 16px / 32px monospace; 14 white-space: pre; 15 padding: 0 4px; 16 background-color: yellow; 17 width: 11.1ch; 18 overflow: hidden; /* can be removed once implementations update their old -webkit-line-clamp implementations */ 19 } 20 .float { 21 float: right; 22 color: orange; 23 } 24 </style> 25 <div class="clamp"><div><div class="float">[f]</div>A B C D 26 E F G H</div></div>