[csswg-drafts] [css-line-breaking] Soft-break vs. <br>, inside embedded opposiate directional run (#5121)

ntounsi has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-line-breaking] Soft-break vs. <br>, inside embedded opposiate directional run  ==
section-5 ([https://drafts.csswg.org/css-text-3/#line-breaking](https://drafts.csswg.org/css-text-3/#line-breaking)) talks about soft and forced line break but says nothing about the effect, i.e. the rendering. Is it the same in both cases? That is, if a line is wrapped at some place, should the resulting lines appear as if it was a forced break at the same place? 

As for bidi texts, if a line break occurs inside a phrase that is progressing in opposite direction, wrt the surrounding context, the break (rightfully) does not end the "embedded" base direction, unlike HTML `<br>`. 
As a consequence, if the next line begins with a directionally ambiguous character, the rest of the phrase takes the global opposite base direction. 
Example (in RTL context): 

![lineBreak](https://user-images.githubusercontent.com/15004708/83010239-dc591280-a00f-11ea-86a6-c1e089d82d83.jpeg)
The 1st two lines result from a text wrapped (soft-break) before the number 2. The whole Latin string flows LTR. Then the same text with forced-break at the same position. In the last line, the rest of the Latin string flows RTL. 

Looks odd to me. 

Source: 
```
<div  dir="rtl" style="width: 50%;">
 <p>
 تحدثنا وقالت في لغتها: 
 « I should be living at 2, Atlas street</span> »
 ثم ذهبت. 
 </p>
 <p>
 تحدثنا وقالت في لغتها: 
 « I should be living at<br> 2, Atlas street</span> »
 ثم ذهبت. 
 </p>
</div>
```
note  `<br>` before `2`  in the second `<p>`.

Can CSS line breaking spec/rules consider such case (or similar)? I didn't see that in the document.
Or simply indicate in the first para of section-5 ([https://drafts.csswg.org/css-text-3/#line-breaking](https://drafts.csswg.org/css-text-3/#line-breaking)), that forced break and soft break occurring at the same point, may have differences in rendering for some scripts (or something like).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5121 using your GitHub account

Received on Wednesday, 27 May 2020 11:55:44 UTC