text-underline-offset-scroll-001.html (1506B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test case for text-underline-offset</title> 6 <meta name="assert" content="text-underline-offset should influence the placement of the underline"> 7 <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@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-4/#underline-offset"> 10 <link rel="match" href="reference/text-underline-offset-scroll-001-ref.html"> 11 <link rel="mismatch" href="reference/text-underline-offset-scroll-001-notref.html"> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style> 14 /* 15 * Testing to make sure that positioning the underline 16 * outside of the scrollframe does not create scrollable 17 * overflow and is not visible outside of the div 18 */ 19 #scroll{ 20 border: black dashed; 21 overflow-y: auto; 22 height: 5em; 23 width: 20em; 24 font: 20px/1 Ahem; 25 } 26 27 #text{ 28 color: transparent; 29 text-decoration: red underline; 30 text-decoration-skip-ink: none; 31 text-underline-offset: 5em; 32 text-underline-position:from-font; 33 } 34 </style> 35 </head> 36 <body> 37 <div>Test fails if there is a red line or scrollbar in the dashed area</div> 38 <div id="scroll"><span id="text">XXXXXXX</span></div> 39 </body> 40 </html>