text-decoration-subelements-002.html (1483B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test case for text-decoration with subelements</title> 6 <meta name="assert" content="for underlines and overlines the UA must use a single thickness and position on each line for the decorations deriving from a single decorating box"> 7 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> 8 <link rel="author" title="Mozilla" href="https://www.mozilla.org"> 9 <link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-underline-position-property"> 10 <link rel="match" href="reference/text-decoration-subelements-002-ref.html"> 11 <meta name="fuzzy" content="maxDifference=0-80;totalPixels=0-42"> 12 <style> 13 div.wrapper { 14 font-size: 2em; 15 position: relative; 16 } 17 div.test { 18 text-decoration: underline; 19 position: absolute; 20 white-space: nowrap; 21 } 22 </style> 23 </head> 24 <body> 25 <p>Test passes if there is a single uniform underline for all the text in each line, 26 <i>not</i> a separate underline for the superscripts: 27 </p> 28 <div class=wrapper> 29 <div style="position: absolute; top: 1em;"> 30 <div class=test>Einstein said that <i>e = mc<sup>2</sup></i>.</div> 31 </div> 32 <div style="position: absolute; top: 3em;"> 33 <div class=test>Is <i>a<sup>n</sup> + b<sup>n</sup> = c<sup>n</sup></i> ever true for <i>n</i> > 2.</div> 34 </div> 35 </div> 36 </body> 37 </html>