line-clamp-auto-with-ruby-003.html (955B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: `line-clamp: auto` with ruby</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-auto-with-ruby-003-ref.html"> 7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 8 <meta name="assert" content="If the last line before clamp has line-under ruby, it should have an ellipsis, and the line-clamp container should be sized the same as a new BFC that had such a ruby at the end."> 9 <style> 10 .clamp { 11 line-clamp: auto; 12 max-height: 6lh; 13 font: 16px / 32px serif; 14 white-space: pre; 15 background-color: yellow; 16 padding: 0 4px; 17 } 18 ruby { 19 ruby-position: under; 20 } 21 rt { 22 font: 32px / 32px Ahem; 23 color: blue; 24 } 25 </style> 26 27 <div class="clamp">Line 1 28 Line 2 29 Line 3 30 Line 4 31 <ruby>Line 5<rt>X</ruby> 32 Line 6</div> 33 34 <p>Following content.</p>