Skip to content

Commit 83e344e

Browse files
committed
[css-text-3] Simplify examples. w3c#5759
1 parent eb61086 commit 83e344e

File tree

1 file changed

+20
-34
lines changed

1 file changed

+20
-34
lines changed

css-text-3/Overview.bs

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5721,51 +5721,37 @@ Bidirectionality and Line Boxes</h3>
57215721

57225722

57235723
<div class="example">
5724-
<p>In the following example:
5724+
<p>Because neutral characters (such as punctuation)
5725+
and isolated runs are skipped
5726+
when <a href="http://unicode.org/reports/tr9/#P2">finding the inline base direction of a plaintext bidi paragraph</a>,
5727+
the line box in the following example will be left-to-right
5728+
(and thus left-aligned given ''text-align: start''),
5729+
as dictated by the first strong character, ‘h’:
57255730
<pre>
57265731
&lt;para style="display: block; direction: rtl; unicode-bidi:plaintext">
5727-
&lt;quote style="unicode-bidi:plaintext">שלום!&lt;/quote>", he said.
5732+
&lt;quote style="unicode-bidi:plaintext">שלום!&lt;/quote>, he said.
57285733
&lt;/para&gt;</pre>
5729-
5730-
<p>The result should be a left-aligned line looking like this:
5731-
<pre>"!&#1513;&#1500;&#1493;&#1501;", he said.</pre>
5732-
5733-
<p>The line is left-aligned
5734-
(despite the containing block having ''direction: rtl'')
5735-
because the containing block (the <code>&lt;para></code>) has ''unicode-bidi:plaintext'',
5736-
and the line box belongs to a bidi paragraph that is LTR.
5737-
This is because that paragraph's first character with a strong direction
5738-
is the LTR "h" from "he". The RTL "שלום!" does precede the "he",
5739-
but it sits in its own bidi-isolated paragraph that is <em>not</em>
5740-
immediately contained by the <code>&lt;para&gt;</code>,
5741-
and is thus irrelevant to the line box's alignment.
5742-
From from the standpoint of the bidi paragraph immediately contained
5743-
by the <code>&lt;para&gt;</code> containing block,
5744-
the <code>&lt;quote&gt;</code>&rsquo;s bidi-isolated paragraph inside it is,
5745-
by definition, just a neutral U+FFFC character,
5746-
so the immediately-contained paragraph becomes LTR by virtue
5747-
of the "he" following it.
57485734
</div>
57495735

57505736
<div class="example">
57515737
<pre>
5752-
&lt;fieldset style="direction: rtl">
5753-
&lt;textarea style="unicode-bidi:plaintext">
5738+
&lt;textarea style="direction: rtl; unicode-bidi:plaintext">
57545739

57555740
Hello!
57565741

57575742
&lt;/textarea>
5758-
&lt;/fieldset></pre>
5759-
5760-
<p>As expected, the "Hello!" should be displayed LTR
5761-
(i.e. with the exclamation mark on the right end,
5762-
despite the <code>&lt;textarea></code>’s ''direction:rtl'')
5763-
and left-aligned.
5764-
This makes the empty line following it left-aligned as well,
5765-
which means that the caret on that line should appear at its
5766-
left edge. The first empty line, on the other hand, should
5767-
be right-aligned, due to the RTL direction of its containing
5768-
paragraph, the <code>&lt;textarea></code>.
5743+
</pre>
5744+
5745+
<p>Because of ''unicode-bidi: plaintext'',
5746+
the “Hello!” is typeset LTR
5747+
(i.e. with the exclamation mark on the right side)
5748+
and left-aligned,
5749+
ignoring the containing block’s RTL 'direction'.
5750+
This makes the empty line following it LTR as well,
5751+
which means that a caret on that line should appear at its left edge.
5752+
The empty first line, however, is right-aligned:
5753+
having no preceding line,
5754+
it assumes the RTL direction of its containing block.
57695755
</div>
57705756

57715757
<h2 class="no-num" id="order">Appendix A:

0 commit comments

Comments
 (0)