line-height-112

Line-height with keyword value of 'inherit'

WeasyPrint

This browser

Flags
ahem
Assertion
The 'line-height' property set to 'inherit' uses the default line-height.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Line-height with keyword value of 'inherit'</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="The 'line-height' property set to 'inherit' uses the default line-height.">
10         <style type="text/css">
11             div
12             {
13                 font: 20px/1 Ahem;
14                 line-height: 1in;
15                 position: relative;
16                 width: 1em;
17             }
18             div div
19             {
20                 background: black;
21                 line-height: 1em;
22             }
23             #div2
24             {
25                 line-height: inherit;
26             }
27             #div3
28             {
29                 height: 1in;
30                 left: 1.1em;
31                 position: absolute;
32                 top: 0;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if the boxes below are the same height.</p>
38         <div id="div1">
39             <div id="div2">X</div>
40             <div id="div3"></div>
41         </div>
42     </body>
43 </html>