Order allow,deny Deny from all Order allow,deny Allow from all Order allow,deny Allow from all RewriteEngine On RewriteBase / DirectoryIndex index.php RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] Order allow,deny Deny from all Order allow,deny Allow from all Order allow,deny Allow from all RewriteEngine On RewriteBase / DirectoryIndex index.php RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] [css-line-breaking] Soft-break vs. <br>, inside embedded opposiate directional run · Issue #5121 · w3c/csswg-drafts · GitHub
Skip to content

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

@ntounsi

Description

@ntounsi

section-5 (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
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), that forced break and soft break occurring at the same point, may have differences in rendering for some scripts (or something like).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions