font-systemfont-rule-004

Font shorthand property reset to default values if not explicitly set

WeasyPrint

This browser

Assertion
The 'font' shorthand property resets any property not explicitly given a value to its initial value.

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 property reset to default values if not explicitly set</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-shorthand">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="The 'font' shorthand property resets any property not explicitly given a value to its initial value.">
 9         <style type="text/css">
10             #div1
11             {
12                 font: 14pt serif;
13             }
14             .test
15             {
16                 font-size: 96px;
17                 font-style: italic;
18                 font-weight: bold;
19             }
20             #div2
21             {
22                 font: 14pt serif;
23             }
24         </style>
25     </head>
26     <body>
27         <p>Test passes if the lines of "Filler Text" below match.</p>
28         <div id="div1">Filler Text</div>
29         <div id="div2" class="test">Filler Text</div>
30     </body>
31 </html>