font-145.xht (1561B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: The 'font' property with line-height: normal</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/fonts/003.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-shorthand" /> 8 <link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-prop"/> 9 10 <meta name="flags" content="ahem"/> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"> 13 .container { background: red; height: 1em; width: 6em; } 14 .test { font: 2em/0 Ahem; background: green; color: green; } 15 .test { font: 2em/normal Ahem; } /* should override previous line */ 16 </style> 17 </head> 18 <body> 19 20 <p>Test passes if there is a small filled green rectangle and <strong>no red</strong>.</p> 21 <div class="container"><div class="test">ppp</div></div> 22 23 <!-- "p" is like an underscore in Ahem. --> 24 25 <!-- the result will be that if the line-height is 0, then the 26 container will be visible as the test will be height:0 and the 27 text will overflow the test with a small green line, leaving 28 the red of the container visible. otherwise, line-height is 29 normal, the test block will grow to be bigger than the 30 container, overflowing it, and hiding the red. --> 31 32 <!-- see line-height/001.html --> 33 34 </body> 35 </html>