white-space-applies-to-003

White-space application to 'display: list-item' element

WeasyPrint

This browser

Flags
ahem
Assertion
The 'white-space' property applies to display: list-item 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: list-item' 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: list-item elements.">
10         <style type="text/css">
11             body
12             {
13                 margin-left: 2em;
14             }
15             div
16             {
17                 font: 16px/1em Ahem;
18             }
19             #test
20             {
21                 display: list-item;
22                 white-space: pre;
23             }
24             #ref1, #ref2
25             {
26                 background: black;
27                 display: inline-block;
28                 height: 1em;
29                 width: 2em;
30             }
31             #ref2
32             {
33                 margin-left: 3em;
34             }
35         </style>
36     </head>
37     <body>
38         <p>Test passes if there are two squares below and the left most square has a marker bullet on the left-hand side.</p>
39         <div id="test">XX   XX</div>
40         <div id="ref1"></div><div id="ref2"></div>
41     </body>
42 </html>