tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bidi-breaking-002.xht (2947B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
      2                       "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
      3 <html xmlns="http://www.w3.org/1999/xhtml">
      4 <head>
      5   <title>CSS Test: Bidi paragraph boundaries: Forced Line Breaks</title>
      6   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
      7   <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#bidi-algo"/>
      8   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#direction"/>
      9   <link rel="match" href="bidi-breaking-002-ref.xht" />
     10 
     11   <meta name="assert" content="Forced line breaks of class B (but not class WS)
     12         break bidi paragraphs."/>
     13   <style type="text/css"><![CDATA[
     14      /* Make test easier to read */
     15     .test, .control {
     16       color: blue;
     17       font: bold larger monospace;
     18       margin: 1em;
     19       padding: 0.25em;
     20       border: solid silver;
     21       float: left;
     22     }
     23     .set {
     24       clear: both;
     25       float: left;
     26       border-bottom: solid orange;
     27     }
     28     p + .set {
     29       border-top: solid orange;
     30     }
     31 
     32     /* ensure BDO processing */
     33     bdo {
     34       unicode-bidi: bidi-override;
     35       direction: ltr;
     36     }
     37 
     38     /* Enable preservation of source line breaks
     39        (and PS and LS for certain nonconformant ws-collapsing implementations) */
     40     .pre {
     41       white-space: pre; white-space: pre-lines;
     42     }
     43   ]]></style>
     44 </head>
     45 <body>
     46   <p>In each pair of silver boxes below, the two patterns must be identical.</p>
     47 
     48   <!--
     49   &#x05D0; א is hebrew letter alef
     50   &#x05EA; ת is hebrew letter tav
     51   -->
     52 
     53   <!-- control for bidi support -->
     54   <div class="set">
     55     <div class="test">
     56       <div>&rlm;&nbsp; + - &times; &divide; &#x05D0;</div>
     57       <div>&#x05EA; + - &times; &divide; &nbsp;&rlm;</div>
     58     </div>
     59     <div class="control">
     60       <div><bdo dir="ltr">&#x05D0; &divide; &times; - + &nbsp;</bdo></div>
     61       <div><bdo dir="ltr">&nbsp; &divide; &times; - + &#x05EA;</bdo></div>
     62     </div>
     63   </div>
     64 
     65   <!-- preserved source line break breaks bidi paragraph -->
     66   <div class="set">
     67     <div class="test">
     68       <div class="pre">&#x05D0; + - &times; &divide; &nbsp;
     69 &nbsp; + - &times; &divide; &#x05EA;</div>
     70     </div>
     71     <div class="control">
     72       <div><bdo dir="ltr">&#x05D0; + - &times; &divide; &nbsp;</bdo></div>
     73       <div><bdo dir="ltr">&nbsp; + - &times; &divide; &#x05EA;</bdo></div>
     74     </div>
     75   </div>
     76 
     77   <!-- <br> on shaky ground since HTML4 said it's an LS, but HTML5 will
     78        likely side with PS due to better bidi safety; test below as PS for now;
     79        move to a separate file when this is resolved in HTML5
     80   <div class="set">
     81     <div class="test">
     82       &#x05D0; + - &times; &divide; &nbsp;<br/>
     83       &nbsp; + - &times; &divide; &#x05EA;
     84     </div>
     85     <div class="control">
     86       <div><bdo dir="ltr">&#x05D0; + - &times; &divide; &nbsp;</bdo></div>
     87       <div><bdo dir="ltr">&nbsp; + - &times; &divide; &#x05EA;</bdo></div>
     88     </div>
     89   </div>
     90   -->
     91 </body>
     92 </html>