text-align-white-space-005.xht (2267B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 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="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-06-28 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#alignment-prop" /> 8 <link rel="match" href="text-align-white-space-005-ref.xht" /> 9 10 <meta name="flags" content="ahem may" /> <!-- "may" because level 3 makes it no longer mandatory --> 11 <link rel="help" href="https://drafts.csswg.org/css-text-3/#text-align-property" /> 12 <meta name="assert" content="Setting 'text-align' to 'justify' and 'white-space' to 'pre', text-align is computed to its initial value." /> 13 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 14 <style type="text/css"> 15 div 16 { 17 direction: rtl; 18 font: 20px/1 Ahem; 19 margin-left: 4em; 20 position: relative; 21 width: 12em; 22 } 23 div div 24 { 25 margin: 0; 26 position: absolute; 27 } 28 #test 29 { 30 color: green; 31 text-align: justify; 32 white-space: pre; 33 34 } 35 .red 36 { 37 color: red; 38 } 39 .green 40 { 41 color: green; 42 } 43 </style> 44 </head> 45 <body> 46 <p>Test passes if there is <strong>no red</strong>.</p> 47 <div> 48 <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> 49 <div id="test">xxxx xxxx xxxx 50 xxxx xxxx xxxx 51 </div> 52 </div> 53 </body> 54 </html>