@@ -5667,22 +5667,40 @@ Cursive Scripts</h4>
56675667<h3 id="bidi-linebox">
56685668Bidirectionality and Line Boxes</h3>
56695669
5670- <p> The <a spec=css-writing-modes-3>start</a> and <a spec=css-writing-modes-3>end</a> edges of a line box
5670+ <p> The <a spec=css-writing-modes-3>start</a> and <a spec=css-writing-modes-3>end</a> sides of a line box
56715671 are determined by the <a>inline base direction</a> of the line box.
5672- In most cases, this is given by its containing block's computed 'direction' .
5673-
5674- <p> However if its containing block has ''unicode-bidi: plaintext'' [[!CSS-WRITING-MODES-3]] ,
5675- the line box's <a>inline base direction</a> must be determined
5676- by the <a>inline base direction</a> of the <a>bidi paragraph</a> to which it belongs:
5677- that is, the <a>bidi paragraph</a> for which the line box holds content.
5678- An empty line box
5679- (i.e. one that contains no atomic inlines or
5680- characters other than the line-breaking character, if any)
5681- or one whose <a>bidi paragraph</a> has no strong directionality
5682- (contains only weak or neutral characters),
5683- takes its <a>inline base direction</a> from the preceding line box (if any), or,
5684- if this is the first line box in the containing block,
5685- then from the 'direction' property of the containing block.
5672+
5673+ <p class="note"> Note: Although they usually match,
5674+ the [=inline base direction=] of a [=line box=]
5675+ is distinct from the [=inline base direction=] applied to its contents.
5676+ The [=line box=] ’s [=inline base direction=] affects
5677+ 'text-align-all' , 'text-align-last' , 'text-indent' , and 'hanging-punctuation' --
5678+ i.e. the position and alignment of its contents with respect to its edges.
5679+ It does not affect the formatting or ordering of inline content,
5680+ which is controlled by the Unicode bidirectional algorithm
5681+ as applied by [[CSS-WRITING-MODES-3]] .
5682+
5683+ <p> In most cases, a [=line box=] ’s [=inline base direction=]
5684+ is given by its [=containing block=] 's computed ' direction'.
5685+ However if its [=containing block=] has ''unicode-bidi: plaintext'' [[!CSS-WRITING-MODES-3]] :
5686+
5687+ <ul>
5688+ <li> If the [=bidi paragraph=] to which the [=line box=] belongs
5689+ (that is, the <a>bidi paragraph</a> for which the line box holds content)
5690+ has strong directionality,
5691+ the line box's <a>inline base direction</a> is that direction.
5692+
5693+ <li> If the [=line box=] is empty
5694+ (i.e. contains no [=atomic inlines=] or
5695+ characters other than the newline character, if any)
5696+ or otherwise has no strong directionality
5697+ (contains only weak or neutral characters),
5698+ its <a>inline base direction</a> is taken
5699+ from the preceding line box (if any),
5700+ or, if this is the first line box in the containing block,
5701+ from the 'direction' property of the containing block.
5702+ (This can result in an RTL line box whose contents have an LTR base direction.)
5703+ </ul>
56865704
56875705 <div class="example">
56885706 <p> In the following example,
@@ -5701,11 +5719,6 @@ Bidirectionality and Line Boxes</h3>
57015719 </block></pre>
57025720 </div>
57035721
5704- <p class="note"> Note: The inline base direction determined here
5705- applies to the line box itself, and not to its contents.
5706- It affects 'text-align-all' , 'text-align-last' , 'text-indent' , and 'hanging-punctuation' ,
5707- i.e. the position and alignment of its contents with respect to its edges.
5708- It does not affect the formatting or ordering of its content.
57095722
57105723 <div class="example">
57115724 <p> In the following example:
0 commit comments