text-align-white-space-002

Text-align set to 'justify' with 'white-space' set to 'pre-line'

WeasyPrint

This browser

Flags
ahem
Assertion
Setting 'text-align' to 'justify' and 'white-space' to 'pre-line', 'text-align' remains 'justified'.

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-align set to 'justify' with 'white-space' set to '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#alignment-prop">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="Setting 'text-align' to 'justify' and 'white-space' to 'pre-line', 'text-align' remains 'justified'.">
 9         <style type="text/css">
10             div
11             {
12                 font: 1em/1 Ahem;
13                 position: relative;
14                 width: 9em;
15             }
16             div div
17             {
18                 position: absolute;
19             }
20             #test
21             {
22                 color: green;
23                 text-align: justify;
24                 white-space: pre-line;
25             }
26             .red
27             {
28                 color: red;
29             }
30             .green
31             {
32                 color: green;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if there is no red visible on the page.</p>
38         <div>
39             <div><span class="red">xxx</span><span class="green">xxx</span><span class="red">xxx</span>
40                 <span class="red">xxx</span><span class="green">xxx</span><span class="red">xxx</span>
41                 <span class="red">xxx</span><span class="green">xxx</span><span class="red">xxx</span>
42                 <span class="red">xxx</span><span class="green">x</span><span class="red">xxx</span><span class="green">xx</span></div>
43             <div id="test">XXX XXX XXX XXX XXX XXX XXX XXX</div>
44         </div>
45     </body>
46 </html>