white-space-processing-030

Two spaces adjoining with 'white-space' 'pre-line'/'pre-line'

WeasyPrint

This browser

Flags
ahem
Assertion
One space with 'white-space' set to 'pre-line' adjoining a space with 'white-space' set to 'pre-line' collapse into one space.

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: Two spaces adjoining with 'white-space' 'pre-line'/'pre-line'</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#white-space-model">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="One space with 'white-space' set to 'pre-line' adjoining a space with 'white-space' set to 'pre-line' collapse into one space.">
 9         <style type="text/css">
10             #div1
11             {
12                 font: 16px/1em Ahem;
13             }
14             #span1
15             {
16                 white-space: pre-line;
17             }
18             #span2
19             {
20                 white-space: pre-line;
21             }
22             #div2, #div3
23             {
24                 background: black;
25                 display: inline-block;
26                 height: 1em;
27                 width: 1em;
28             }
29             #div3
30             {
31                 margin-left: 1em;
32             }
33         </style>
34     </head>
35     <body>
36         <p>Test passes if there are only two boxes below.</p>
37         <div id="div1">
38             <span id="span1">X </span>
39             <span id="span2"> X</span>
40             <div>
41                 <div id="div2"></div><div id="div3"></div>
42             </div>
43         </div>
44     </body>
45 </html>