font-040

Font shorthand set to 'inherit' inheriting three values

WeasyPrint

This browser

Flags
ahem
Assertion
The 'font' shorthand property set to 'inherit' inherits the parent element's values.

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: Font shorthand set to 'inherit' inheriting three values</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-shorthand">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="The 'font' shorthand property set to 'inherit' inherits the parent element's values.">
10         <style type="text/css">
11             #wrapper
12             {
13                 font: italic 1in Ahem;
14                 position: relative;
15             }
16             #test
17             {
18                 font: 0 Ahem;
19                 font: inherit;
20                 line-height: 1em;
21             }
22             #reference
23             {
24                 background: black;
25                 height: 1in;
26                 left: 1.4in;
27                 position: absolute;
28                 top: 0;
29                 width: 1in;
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if there are two boxes on the page and they are the same height. One box needs to be slanted to one side.</p>
35         <div id="wrapper">
36             <div id="test">X</div>
37             <div id="reference"></div>
38         </div>
39     </body>
40 </html>