bidi-direction-002

direction - nested ltr and rtl

WeasyPrint

This browser

Assertion
Direction on paragraph should override direction on body

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: direction - nested ltr and rtl</title>
 5     <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
 6     <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-direction">
 7     <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#direction">
 8     <meta name="flags" content="">
 9     <meta name="assert" content="Direction on paragraph should override direction on body">
10     <style type="text/css">
11       body {
12       direction: rtl;
13       }
14       .lefttoright {
15       direction: ltr;
16       }
17     </style>
18   </head>
19   
20   <body>
21     
22     <p>The lines below should be aligned as specified, and end with an exclamation mark</p>
23     
24     <p>
25       !Right-aligned
26     </p>
27     <p class="lefttoright">
28       Left-aligned!
29     </p>
30     
31   </body>
32 </html>