bidi-first-letter-003

:first-letter and direction:rtl - inherent ltr text

WeasyPrint

This browser

Assertion
:first-letter applied to inherent LTR text in RTL context should adhere to text direction, not paragraph direction

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: :first-letter and direction:rtl - inherent ltr text</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/selector.html#first-letter">
 7     <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-direction">
 8     <meta name="flags" content="">
 9     <meta name="assert" content=":first-letter applied to inherent LTR text in RTL context should adhere to text direction, not paragraph direction">
10     <style type="text/css">
11     p.test {
12     font-size: 2em; 
13     direction:rtl;
14     }
15     p.test:first-letter {
16     color:blue;
17     }
18     </style> 
19   </head> 
20   <body> 
21     
22     <p>The leftmost letter (a) in the line below should be blue.</p>
23 
24     <p class="test">axx xxx xxx</p>
25 
26   </body>
27 </html>