font-size-123

CSS Parsing: Negative Font-Size

WeasyPrint

This browser

Flags
invalid
Assertion
If a negative length value is set into a font-size declaration, then such declaration is ignored.

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: CSS Parsing: Negative Font-Size</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/002.xml" type="application/xhtml+xml">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units">
 8   <meta name="assert" content="If a negative length value is set into a     font-size declaration, then such declaration is ignored.">
 9   <meta name="flags" content="invalid">
10   <style type="text/css">
11    div { font-size: 20px; font-size: -10px; display: block; width: 100px; height: 40px; background: red; }
12    div > .em { width: 5em; height: 1em; background: green; display: block; }
13    div > .px { width: 100px; height: 20px; background: green; display: block; }
14   </style>
15  </head>
16  <body>
17   <p>Test passed if there is a green rectangle below and if there is no red.</p>
18   <div>
19    <span class="em"></span>
20    <span class="px"></span>
21   </div>
22  </body>
23 </html>