line-clamp-027.html (884B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: sizing of line-clamp elements with ruby annotations</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-027-ref.html"> 7 <meta name="assert" content="The sizing of a line-clamp element should be exactly as if it had no content after clamp, even if there are ruby annotations involved."> 8 <style> 9 .clamp { 10 line-clamp: 3; 11 font-size: 16px / 16px serif; 12 white-space: pre-wrap; 13 background-color: yellow; 14 } 15 ruby.under { 16 ruby-position: under; 17 } 18 .large { 19 font-size: 3em; 20 } 21 </style> 22 <div class="clamp">Line 1 23 Line 2 24 <ruby class="under">Line 3<rt>ruby</ruby> 25 <ruby>Line 4<rt class="large">ruby</ruby> 26 Line 5 27 <ruby class="under">Line 6<rt class="large">ruby</ruby></div>