text-indent-applies-to-005

Text-indent application on a 'display: inline-block' element

WeasyPrint

This browser

Flags
ahem
Assertion
The 'text-indent' property is applied to 'display: inline-block' elements.

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 application on a 'display: inline-block' element</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#propdef-text-indent">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#indentation-prop">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="The 'text-indent' property is applied to 'display: inline-block' elements.">
10         <style type="text/css">
11             div
12             {
13                 font: 16px/1em Ahem;
14             }
15             span
16             {
17                 display: inline-block;
18                 text-indent: 10em;
19             }
20             #div1
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. (Note that the two boxes do not need to be touching.)</p>
31         <div>
32             <span>XXXXX</span>
33         </div>
34         <div id="div1"></div>
35     </body>
36 </html>