white-space-applies-to-001

White-space application to 'display: inline' element

WeasyPrint

This browser

Flags
ahem
Assertion
The 'white-space' property applies to 'display: inline' 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: White-space application to 'display: inline' 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-white-space">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-prop">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="The 'white-space' property applies to 'display: inline' elements.">
10         <style type="text/css">
11             div
12             {
13                 font: 16px/1em Ahem;
14             }
15             #div1
16             {
17                 display: inline;
18                 white-space: pre;
19             }
20             #div2, #div3
21             {
22                 background: black;
23                 display: inline-block;
24                 height: 1em;
25                 width: 2em;
26             }
27             #div3
28             {
29                 margin-left: 3em;
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if there are only two boxes below.</p>
35         <div>
36             <div id="div1">XX   XX</div>
37         </div>
38         <div id="div2"></div><div id="div3"></div>
39     </body>
40 </html>