dir-selector-change-002.html (837B)
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="../reference/ref-filled-green-100px-square.xht"> 8 <style> 9 div { 10 width: 100px; 11 height: 100px; 12 background-color: red; 13 } 14 15 div:dir(rtl) { 16 background-color: green; 17 } 18 </style> 19 </head> 20 <body> 21 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 22 <div id="inner"></div> 23 <script> 24 inner.offsetTop; 25 inner.setAttribute("dir", "rtl"); 26 </script> 27 </body> 28 </html>