From 83e344e3c19476224659dcc464e858c2ee868218 Mon Sep 17 00:00:00 2001 From: fantasai Date: Wed, 2 Dec 2020 14:44:02 -0500 Subject: [PATCH] [css-text-3] Simplify examples. #5759 --- css-text-3/Overview.bs | 54 ++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/css-text-3/Overview.bs b/css-text-3/Overview.bs index 2974870eda7..da11ec39d01 100644 --- a/css-text-3/Overview.bs +++ b/css-text-3/Overview.bs @@ -5721,51 +5721,37 @@ Bidirectionality and Line Boxes
-

In the following example: +

Because neutral characters (such as punctuation) + and isolated runs are skipped + when finding the inline base direction of a plaintext bidi paragraph, + the line box in the following example will be left-to-right + (and thus left-aligned given ''text-align: start''), + as dictated by the first strong character, ‘h’:

       <para style="display: block; direction: rtl; unicode-bidi:plaintext">
-      <quote style="unicode-bidi:plaintext">שלום!</quote>", he said.
+      “<quote style="unicode-bidi:plaintext">שלום!</quote>”, he said.
       </para>
- -

The result should be a left-aligned line looking like this: -

"!שלום", he said.
- -

The line is left-aligned - (despite the containing block having ''direction: rtl'') - because the containing block (the <para>) has ''unicode-bidi:plaintext'', - and the line box belongs to a bidi paragraph that is LTR. - This is because that paragraph's first character with a strong direction - is the LTR "h" from "he". The RTL "שלום!" does precede the "he", - but it sits in its own bidi-isolated paragraph that is not - immediately contained by the <para>, - and is thus irrelevant to the line box's alignment. - From from the standpoint of the bidi paragraph immediately contained - by the <para> containing block, - the <quote>’s bidi-isolated paragraph inside it is, - by definition, just a neutral U+FFFC character, - so the immediately-contained paragraph becomes LTR by virtue - of the "he" following it.

-      <fieldset style="direction: rtl">
-      <textarea style="unicode-bidi:plaintext">
+      <textarea style="direction: rtl; unicode-bidi:plaintext">
 
       Hello!
 
       </textarea>
-      </fieldset>
- -

As expected, the "Hello!" should be displayed LTR - (i.e. with the exclamation mark on the right end, - despite the <textarea>’s ''direction:rtl'') - and left-aligned. - This makes the empty line following it left-aligned as well, - which means that the caret on that line should appear at its - left edge. The first empty line, on the other hand, should - be right-aligned, due to the RTL direction of its containing - paragraph, the <textarea>. + + +

Because of ''unicode-bidi: plaintext'', + the “Hello!” is typeset LTR + (i.e. with the exclamation mark on the right side) + and left-aligned, + ignoring the containing block’s RTL 'direction'. + This makes the empty line following it LTR as well, + which means that a caret on that line should appear at its left edge. + The empty first line, however, is right-aligned: + having no preceding line, + it assumes the RTL direction of its containing block.

Appendix A: