line-height-bleed-002

Glyphs overflow when line height of container is less than content height

WeasyPrint

This browser

Flags
ahem
Assertion
That glyphs bleed out of the box when 'line-height' can overlap adjoining line boxes.

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: Glyphs overflow when line height of container is less than content height</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="That glyphs bleed out of the box when 'line-height' can overlap adjoining line boxes.">
10         <style type="text/css">
11             div
12             {
13                 color: green;
14                 font: 1in/1em Ahem;
15                 line-height: 0;
16                 margin-top: 1in;
17                 width: 1in;
18             }
19             div:first-letter
20             {
21                 color: red;
22             }
23         </style>
24     </head>
25     <body>
26         <p>Test passes if there is a green box below and there is no red visible on the page.</p>
27         <div>
28             <span>X X</span>
29         </div>
30     </body>
31 </html>