text-align-white-space-006

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

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' and 'direction' set to 'rtl'</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                 direction: rtl;
13                 font: 1em/1 Ahem;
14                 position: relative;
15                 width: 9em;
16             }
17             div div
18             {
19                 position: absolute;
20             }
21             #test
22             {
23                 color: green;
24                 text-align: justify;
25                 white-space: pre-line;
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">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">xxx</span><span class="red">xxx</span>
43                 <span class="green">xx</span><span class="red">xxx</span><span class="green">x</span><span class="red">xxx</span></div>
44             <div id="test">XXX XXX XXX XXX XXX XXX XXX XXX</div>
45         </div>
46     </body>
47 </html>