| OLD | NEW |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> | 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> | 3 <head> |
| 4 <title>CSS Test: The 'line-height' property</title> | 4 <title>CSS Test: The 'line-height' property</title> |
| 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> | 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> |
| 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/Browse
rBugsSection/css21testsuite/" /> <!-- 2012-04-04 --> | 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/Browse
rBugsSection/css21testsuite/" /> <!-- 2012-04-04 --> |
| 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/fonts/line-hei
ght/001.html" type="text/html"/> | 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/fonts/line-hei
ght/001.html" type="text/html"/> |
| 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#line-height" /> | 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#line-height" /> |
| 9 <link rel="match" href="line-height-121-ref.xht" /> | 9 <link rel="match" href="line-height-121-ref.xht" /> |
| 10 | 10 |
| 11 <meta name="flags" content="ahem" /> | 11 <meta name="flags" content="ahem" /> |
| 12 | 12 |
| 13 <style type="text/css"> | 13 <style type="text/css"> |
| 14 .container { background: red; height: 1.25em; width: 7.5em; } | 14 .container { background: red; height: 1.25em; width: 7.5em; } |
| 15 .test { font: 2.5em/0 Ahem; background: green; color: green; } | 15 .test { font: 2.5em/0 Ahem; background: green; color: green; } |
| 16 .test { line-height: 1; } /* should override previous line */ | 16 .test { line-height: 1; } /* should override previous line */ |
| 17 </style> | 17 </style> |
| 18 </head> | 18 </head> |
| 19 <body> | 19 <body> |
| 20 <p>Test passes if there is a short green rectangle and <strong>no red</strong>
.</p> | 20 <p>Test passes if there is a short green rectangle and <strong>no red</strong>
.</p> |
| 21 <div class="container"><div class="test">ppp</div></div> | 21 <div class="container"><div class="test">ppp</div></div> |
| 22 | 22 |
| 23 <!-- "p" is like an underscore in Ahem. --> | 23 <!-- "p" is like an underscore in Ahem. --> |
| 24 | 24 |
| 25 <!-- the result will be that if the line-height is 0, then the | 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 | 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 | 27 text will overflow the test with a small green line, leaving |
| 28 the red of the container visible. otherwise, line-height is | 28 the red of the container visible. otherwise, line-height is |
| 29 1, the test block will grow to be bigger than the | 29 1, the test block will grow to be bigger than the |
| 30 container, overflowing it, and hiding the red. --> | 30 container, overflowing it, and hiding the red. --> |
| 31 | 31 |
| 32 <!-- see ../001.html --> | 32 <!-- see ../001.html --> |
| 33 | 33 |
| 34 </body> | 34 </body> |
| 35 </html> | 35 </html> |
| OLD | NEW |