text-box-trim-ruby-start-001.html (875B)
1 <!DOCTYPE html> 2 <title>text-box-trim ignores ruby annotations over</title> 3 <link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim"> 4 <link rel="help" href="https://www.w3.org/TR/css-ruby/"> 5 <link rel="match" href="text-box-trim-ruby-start-001-ref.html"> 6 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 7 <style> 8 .spacer { 9 height: 40px; 10 background: lightgray; 11 } 12 .target { 13 font: 40px/1 Ahem; 14 text-box-trim: trim-start; 15 text-box-edge: text; 16 } 17 rt { 18 /* The Ruby annotation positioning is UA-dependent. In order to ref-test the 19 trimming of parts above the ascent, hide the Ruby annotation. */ 20 color: transparent; 21 } 22 </style> 23 <div class="spacer"></div> 24 <div class="target">A <ruby>BASE<rt style="ruby-position: over">RUBY</rt></ruby> <ruby>BASE<rt style="ruby-position: under">RUBY</rt></ruby> B</div> 25 <div class="spacer"></div>