painting-order-underline-001.xht (1467B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: 'underline' decoration painting order and descender</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order" title="E.2 Painting order" /> 11 <link rel="help" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#lining-striking-props" title="16.3.1 Underlining, overlining, striking, and blinking: the 'text-decoration' property" /> 12 <link rel="match" href="painting-order-underline-001-ref.xht" /> 13 14 <meta content="ahem" name="flags" /> 15 <meta content="This test checks that underlining painting is done before glyphs are painted; therefore, if the underlining crosses the descenders (glyphs like 'g', 'j', 'p', 'q', 'y' have a descender), then the descender part must overlap the underline." name="assert" /> 16 17 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 18 <style type="text/css"><![CDATA[ 19 div 20 { 21 color: red; 22 font: 12.5em/1 Ahem; /* computes to 200px/200px */ 23 text-decoration: underline; 24 } 25 26 span 27 { 28 color: green; 29 } 30 ]]></style> 31 32 </head> 33 34 <body> 35 36 <p>Test passes if there is a thick green bar and <strong>no red</strong>.</p> 37 38 <div><span>pp</span></div> 39 40 </body> 41 </html>