font-weight-rule-003

Font-weight inherits the computed weight

WeasyPrint

This browser

Assertion
Child elements inherit their parent's actual font weight.

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-weight inherits the computed weight</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#font-boldness">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Child elements inherit their parent's actual font weight.">
 9         <style type="text/css">
10             #parent
11             {
12                 font-weight: bold;
13             }
14             #reference
15             {
16                 font-weight: bold;
17             }
18             div div
19             {
20                 font-weight: inherit;
21             }
22         </style>
23     </head>
24     <body>
25         <p>Test passes if the lines of "Filler Text" below match.</p>
26         <div id="reference">Filler Text</div>
27         <div id="parent">
28             <div>Filler Text</div>
29         </div>
30     </body>
31 </html>