bdi-auto-dir-default.html (2006B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"/> 5 <title>HTML Test: BDI: has dir=auto by default</title> 6 <link rel="match" href="bdi-auto-dir-default-ref.html"/> 7 <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"/> 8 <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"/> 9 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-bdi-element"/> 10 <meta name="assert" content=" 11 'The dir global attribute defaults to auto on this element (it never inherits from the parent 12 element like with other elements).'"/> 13 <style> 14 body{ 15 font-size:2em; 16 } 17 .test, .ref { 18 border: medium solid gray; 19 width: 500px; 20 margin: 20px; 21 } 22 .comments { display: none; } 23 </style> 24 </head> 25 <body> 26 <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> 27 <div class="comments"> 28 Key to entities used below: 29 א ... ו - The first six Hebrew letters (strongly RTL). 30 ‭ - The LRO (left-to-right override) formatting character. 31 ‬ - The PDF (pop directional formatting) formatting character; closes LRO. 32 In each DIV of the test: 33 - the first BDI, having no characters with strong direction, should be LTR by default; 34 - the second BDI, having an LTR character first, should be LTR by default; 35 - the third BDI, having an RTL character first, should be RTL by default. 36 </div> 37 <div class="test"> 38 <div dir="ltr"><bdi>[:)]</bdi>, <bdi>[+- a ב]</bdi>, <bdi>[1 ג d]</bdi>...</div> 39 <div dir="rtl"><bdi>[:)]</bdi>, <bdi>[+- a ב]</bdi>, <bdi>[1 ג d]</bdi>...</div> 40 </div> 41 <div class="ref"> 42 <div dir="ltr">‭[:)], [+- a ב], [d ג 1]...‬</div> 43 <div dir="rtl">‭...[d ג 1] ,[+- a ב] ,[:)]‬</div> 44 </div> 45 </body> 46 </html>