text-align-white-space-008

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

WeasyPrint

This browser

Flags
ahem
Assertion
Setting 'text-align' to 'justify' and 'white-space' to 'nowrap', text-align is computed to 'justify'.

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 'nowrap' 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 'nowrap', text-align is computed to 'justify'.">
 9         <style type="text/css">
10             div
11             {
12                 direction: rtl;
13                 font: 1em/1 Ahem;
14                 margin-left: 9em;
15                 position: relative;
16                 width: 16em;
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: nowrap;
28             }
29             .red
30             {
31                 color: red;
32             }
33             .green
34             {
35                 color: green;
36             }
37         </style>
38     </head>
39     <body>
40         <p>Test passes if there is no red visible on the page.</p>
41         <div>
42             <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></div>
43             <div id="test">xxxx xxxx xxxx</div>
44         </div>
45     </body>
46 </html>