line-clamp-with-text-overflow-string-003.html (939B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: line-clamp with text-overflow<string></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-text-overflow-string-003-ref.html"> 7 <meta name="assert" content="If text-overflow has a string value, all lines that ellipsize because of that property should use that string as the ellipsis. This should happen even inside of a line-clamp container."> 8 <style> 9 .clamp { 10 display: -webkit-box; 11 -webkit-box-orient: vertical; 12 -webkit-line-clamp: 4; 13 line-clamp: 4; 14 font: 16px / 32px monospace; 15 white-space: pre; 16 background-color: yellow; 17 padding: 0 4px; 18 width: 35.1ch; 19 text-overflow: "-"; 20 overflow: hidden; 21 } 22 </style> 23 <div class="clamp">Line 1 24 Line 2 overflows the line-clamp container 25 Line 3 26 Line 4 27 Line 5</div>