text-align-white-space-005

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

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