font-024

Font shorthand set using the values font-variant, font-weight, font-size, line-height and font-family

WeasyPrint

This browser

Flags
ahem
Assertion
The 'font' shorthand property accepts and sets font-variant, font-weight, font-size, line-height and font-family.

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 using the values font-variant, font-weight, font-size, line-height and font-family</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 accepts and sets font-variant, font-weight, font-size, line-height and font-family.">
10         <style type="text/css">
11             #wrapper
12             {
13                 position: relative;
14             }
15             #test
16             {
17                 font: small-caps bold 1in/1em Ahem;
18                 position: absolute;
19             }
20             #reference
21             {
22                 color: red;
23                 font-family: Ahem;
24                 font-size: 1in;
25                 font-variant: small-caps;
26                 font-weight: bold;
27                 height: 1in;
28                 left: 0;
29                 line-height: 1em;
30                 position: absolute;
31                 top: 0;
32                 width: 1in;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if there is no red visible on the page.</p>
38         <div id="wrapper">
39             <div id="reference">x</div>
40             <div id="test">x</div>
41         </div>
42     </body>
43 </html>