bdi-neutral-to-surrounding-run.html (2798B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"/> 5 <title>HTML Test: BDI: neutral to surrounding letters</title> 6 <link rel="match" href="bdi-neutral-to-surrounding-run-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 'For the purposes of applying the bidirectional algorithm to the paragraph-level 12 container that a bdi element finds itself within, the bdi element must be treated 13 like a U+FFFC OBJECT REPLACEMENT CHARACTER.' 14 Thus, regardless of its content and its dir attribute (if any), a BDI will not prevent 15 a strongly RTL (or LTR) character preceding it from forming a single directional run with 16 another strongly RTL (LTR) character following it."/> 17 <style> 18 body{ 19 font-size:2em; 20 } 21 .test, .ref { 22 border: medium solid gray; 23 width: 400px; 24 margin: 20px; 25 } 26 .comments { display: none; } 27 </style> 28 </head> 29 <body> 30 <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> 31 <div class="comments"> 32 Key to entities used below: 33 א ... ו - The first six Hebrew letters (strongly RTL). 34 ‭ - The LRO (left-to-right override) formatting character. 35 ‬ - The PDF (pop directional formatting) formatting character; closes LRO. 36 If the BDI in the test's first DIV were a SPAN, its b would prevent the א and the ב 37 from forming a single RTL run and thus keep the >s between from being mirrored into <s. 38 </div> 39 <div class="test"> 40 <div dir="ltr">א > <bdi>[b]</bdi> > ג...</div> 41 <div dir="ltr">א > <bdi dir="ltr">[b]</bdi> > ג...</div> 42 <div dir="ltr">א > <bdi dir="rtl">[b]</bdi> > ג...</div> 43 <div dir="rtl">a > <bdi>[ב]</bdi> > c...</div> 44 <div dir="rtl">a > <bdi dir="ltr">[ב]</bdi> > c...</div> 45 <div dir="rtl">a > <bdi dir="rtl">[ב]</bdi> > c...</div> 46 </div> 47 <div class="ref"> 48 <div dir="ltr">‭ג < [b] < א...‬</div> 49 <div dir="ltr">‭ג < [b] < א...‬</div> 50 <div dir="ltr">‭ג < [b] < א...‬</div> 51 <div dir="rtl">‭...a > [ב] > c‬</div> 52 <div dir="rtl">‭...a > [ב] > c‬</div> 53 <div dir="rtl">‭...a > [ב] > c‬</div> 54 </div> 55 </body> 56 </html>