text-underline-offset-002.html (1387B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test case for text-underline-offset</title> 6 <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com"> 7 <link rel="author" title="Mozilla" href="https://www.mozilla.org"> 8 <link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#underline-offset"> 9 <link rel="match" href="reference/text-underline-offset-002-ref.html"> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style> 12 #main{ 13 border-bottom: 1px solid cyan; 14 display: flex; 15 } 16 #text, #norm{ 17 text-decoration-color: green; 18 text-decoration-line: underline; 19 text-decoration-skip-ink: none; 20 font: 20px/1 Ahem; 21 color: transparent; 22 position: relative; 23 margin-right: 10px; 24 } 25 #text{ 26 top: 10px; 27 text-underline-offset: 11px; 28 } 29 #norm{ 30 top: 21px; 31 text-underline-offset: 0px; 32 } 33 </style> 34 </head> 35 <body > 36 <p class="instructions">Test passes if the lines are at the same level</p> 37 <div id="main"> 38 <div> 39 <p>left<span id="text">XXXX</span></p> 40 </div> 41 <div> 42 <p><span id="norm">XXXX</span>right</p> 43 </div> 44 </div> 45 </body> 46 </html>