text-indent-inherited-001

Text-indent and inline-block level inheritance

WeasyPrint

This browser

Flags
ahem
Assertion
The 'text-indent' property is inherited by inline-block level elements resulting in a double indent.

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: Text-indent and inline-block level inheritance</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#indentation-prop">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="The 'text-indent' property is inherited by inline-block level elements resulting in a double indent.">
 9         <style type="text/css">
10             #div1
11             {
12                 font-family: Ahem;
13                 line-height: 1em;
14                 text-indent: 5em;
15             }
16             div div
17             {
18                 display: inline-block;
19             }
20             #div2
21             {
22                 background: blue;
23                 height: 1em;
24                 margin-left: 10em;
25                 width: 5em;
26             }
27         </style>
28     </head>
29     <body>
30         <p>Test passes if the black box below is directly above the blue box.</p>
31         <div id="div1">
32             <div>XXXXX</div>
33         </div>
34         <div id="div2"></div>
35     </body>
36 </html>