dir-selector-change-001.html (804B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Selectors Level 4 Test: Check for correctly updating :dir matching on dir attribute change from default(ltr) to rtl</title> 5 <link rel="author" title="Miyoung Shin" href="mailto:myid.shin@igalia.com"> 6 <link rel="help" href="http://www.w3.org/TR/selectors4/#dir-pseudo"> 7 <link rel="match" href="dir-selector-change-001-ref.html"> 8 <style> 9 #x:dir(rtl) + span { background-color: lime } 10 #outer { direction:ltr } 11 </style> 12 </head> 13 <body> 14 <div id="outer" style="-webkit-locale: 'en'"> 15 <div> 16 <div id="x"></div> 17 <span>The background color should be lime</span> 18 </div> 19 </div> 20 <script> 21 outer.offsetTop; 22 outer.setAttribute("dir", "rtl"); 23 </script> 24 </body> 25 </html>