text-indent-012

CSS text-indent: Hyatt's Evil Test Which Mixes Lots Of Stuff

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html lang="en">
 3  <head>
 4   <title>CSS Test: CSS text-indent: Hyatt's Evil Test Which Mixes Lots Of Stuff</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/box/block/text-indent/002.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#indentation-prop">
 8   <style type="text/css">
 9    p { font: 16px/1 serif; margin: 0; }
10    .prerequisite { display: inline; font: 1em/1 Ahem, sans-serif; background: red; color: white; }
11    .control { background-color: yellow; position: absolute; top: 75px; height: 60px; width: 200px; border: 2px solid black; }
12    .control .a { background-color: orange; position: absolute; width: 50px; height: 50px; }
13    .control .b { background-color: orange; position: absolute; left: 150px; width: 50px; height: 50px; }
14    .test { background-color: yellow; text-indent: 100px; position: absolute; top: 175px; border: 2px solid black; font: 50px/1 Ahem; }
15    .test .a { background-color: orange; width: 50px; height: 50px; float: left; }
16    .test .b { background-color: orange; display: inline-block; width: 50px; height: 50px; }
17   </style>
18  </head>
19  <body>
20   <p class="prerequisite">Ahem_font_required_for_this_test.</p>
21   <p>The following two blocks should be identical.</p>
22   <div class="control">
23    <div class="a"></div>
24    <div class="b"></div>
25   </div>
26   <div class="test"> <!-- this should shrink wrap to the intrinsic, no-line-wrapping width -->
27    <div class="a"></div> <!-- that's a float. -->
28    <div class="b"></div> <!-- that's an inline-block. it should be text-indented 100px from the left edge of the float. -->
29    <!-- the inline-block should sit on top of the baseline, which should be 0.2em from the bottom of the 
30         block, since the Ahem font has a 0.2em descender. font-size is 50px, so 0.2em is 10px. -->
31   </div>
32  </body>
33 </html>