text-align-white-space-001

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

WeasyPrint

This browser

Flags
ahem
Assertion
Setting 'text-align' to 'justify' and 'white-space' to 'pre', text-align is computed to its initial value.

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'</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', text-align is computed to its initial value.">
 9         <style type="text/css">
10             div
11             {
12                 font: 1em/1 Ahem;
13                 position: relative;
14                 width: 6em;
15             }
16             div div
17             {
18                 position: absolute;
19             }
20             #test
21             {
22                 color: green;
23                 text-align: justify;
24                 white-space: pre;
25                 
26             }
27             .red
28             {
29                 color: red;
30             }
31             .green
32             {
33                 color: green;
34             }
35         </style>
36     </head>
37     <body>
38         <p>Test passes if there is no red visible on the page.</p>
39         <div>
40             <div><span class="red">xxxx</span><span class="green">x</span><span class="red">xxxx</span><span class="green">x</span><span class="red">xxxx</span> <span class="red">xxxx</span><span class="green">x</span><span class="red">xxxx</span><span class="green">x</span><span class="red">xxxx</span></div>
41             <div id="test">xxxx xxxx xxxx
42 xxxx xxxx xxxx
43             </div>
44         </div>
45     </body>
46 </html>