bidi-breaking-003

Bidi paragraph boundaries: Forced Line Breaks (Unicode)

WeasyPrint

This browser

Flags
may
Assertion
Forced line breaks of class B (but not class WS) break bidi paragraphs.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 <head>
 4   <title>CSS Test: Bidi paragraph boundaries: Forced Line Breaks (Unicode)</title>
 5   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 6   <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#direction">
 8   <meta name="flags" content="may">
 9   <meta name="assert" content="Forced line breaks of class B (but not class WS)         break bidi paragraphs.">
10   <style type="text/css">
11      /* Make test easier to read */
12     .test, .control {
13       color: blue;
14       font: bold larger monospace;
15       margin: 1em;
16       padding: 0.25em;
17       border: solid silver;
18       float: left;
19     }
20     .set {
21       clear: both;
22       float: left;
23       border-bottom: solid orange;
24     }
25     p + .set {
26       border-top: solid orange;
27     }
28 
29     /* ensure BDO processing */
30     bdo {
31       unicode-bidi: bidi-override;
32       direction: ltr;
33     }
34 
35     /* Enable preservation of source line breaks
36        (and PS and LS for certain nonconformant ws-collapsing implementations) */
37     .pre {
38       white-space: pre; white-space: pre-lines;
39     }
40   </style>
41 </head>
42 <body>
43   <p>In each pair of silver boxes below, the two patterns must be identical.</p>
44 
45   <!-- control for bidi support -->
46   <div class="set">
47     <div class="test">
48       <div>&rlm;&nbsp; + - &times; &divide; א</div>
49       <div>ת + - &times; &divide; &nbsp;&rlm;</div>
50     </div>
51     <div class="control">
52       <div><bdo dir="ltr">א &divide; &times; - + &nbsp;</bdo></div>
53       <div><bdo dir="ltr">&nbsp; &divide; &times; - + ת</bdo></div>
54     </div>
55   </div>
56 
57   <!-- paragraph separator breaks bidi paragraph -->
58   <div class="set">
59     <div class="test">
60       <div class="pre">א + - &times; &divide; &nbsp;&#x2029;&nbsp; + - &times; &divide; ת</div>
61     </div>
62     <div class="control">
63       <div><bdo dir="ltr">א + - &times; &divide; &nbsp;</bdo></div>
64       <div><bdo dir="ltr">&nbsp; + - &times; &divide; ת</bdo></div>
65     </div>
66   </div>
67 
68   <!-- line separator does not break bidi paragraph -->
69   <div class="set">
70     <div class="test">
71       <div class="pre">&rlm;&nbsp; + - &times; &divide; א&#x2028;&nbsp; + - &times; &divide; ת</div>
72     </div>
73     <div class="control">
74       <div><bdo dir="ltr">א + - &times; &divide; &nbsp;</bdo></div>
75       <div><bdo dir="ltr">&nbsp; + - &times; &divide; ת</bdo></div>
76     </div>
77   </div>
78 
79 <!--
80 PS &#x2029;
81 LS &#x2028;
82 -->
83 </body>
84 </html>