text-align-justifyall-003

text-align: justify-all, dir=rtl

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
text-align:justify-all aligns text in order to exactly fill the line box, forcing the last line to justify as well.

Source

 1 <!DOCTYPE html>
 2 <html lang="en"><head>
 3 <meta charset="utf-8">
 4 <title>text-align: justify-all, dir=rtl</title>
 5 <link href="mailto:ishida@w3.org" rel="author" title="Richard Ishida">
 6 <link href="https://drafts.csswg.org/css-text-3/#text-align-property" rel="help">
 7 <link href="reference/text-align-justifyall-ref-003.htm" rel="match">
 8 <meta content="text-align:justify-all aligns text in order to exactly fill the line box, forcing the last line to justify as well." name="assert">
 9 <style type="text/css">
10 .test { text-align: justify-all; }
11 /* the CSS below is not part of the test */
12 .test, .ref { border: 1px solid orange;  margin: 20px; width: 399px; color: orange; font: 24px/24px ahem; }
13 .ref { text-align: right; position: relative; height:72px;  }
14 .rb { position: absolute;  background-color: orange;  width: 72px; }
15 #rb1 { top: 0; left: 0; height: 48px;  }
16 #rb2 { top: 0; left: 109px; height: 48px; }
17 #rb3 { top: 0; left: 218px; height: 48px; }
18 #rb4 { top: 0; left: 327px; height: 72px; }
19 #rb5 { top: 48px; right: 96px; height: 24px; }
20 #rb6 { top: 48px; right: 192px; height: 24px; }
21 </style>
22 </head>
23 <body>
24 <div id="instructions">Test passes if the shading in both orange boxes is the same.</div>
25 <div class="test" dir="rtl">XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX </div>
26 <div class="ref"><div id="rb1" class="rb"></div><div id="rb2" class="rb"></div><div id="rb3" class="rb"></div><div id="rb4" class="rb"></div><div id="rb5" class="rb"></div><div id="rb6" class="rb"></div></div>
27 
28 </body></html>