unicode-bidi: plaintext alignment of all-neutral paragraphs in CSS

On 9/15/16 10:29 AM, Aharon (Vladimir) Lanin wrote:
> I do not think that there is a problem with the directionality algorithm. 
> Aside from alignment, it makes no difference whether that isolate paragraph is 
> displayed as LTR overall or RTL overall. And for much more important and 
> common cases of all-neutral text - phone numbers and, to a smaller extent, 
> dates, times, and signed numbers - its being LTR by default is extremely 
> important.
> 
> I /do/ think that there is a problem with the definition of start alignment, 
> which is not controlled by Unicode, but by various other specs, such as CSS. 
> The problem affects the alignment of all-neutral paragraphs generally, like 
> the examples cited above, not just the corner case of an isolate. Start 
> alignment is generally defined as "left" for an LTR paragraph, and "right" for 
> an RTL paragraph, and this means that an all-neutral paragraph, which is LTR 
> by the UBA, is left-aligned - even if the alignment outside that paragraph is 
> right. This makes the all-neutral paragraph needlessly different from its 
> surroundings and usually looking pretty bad.
> 
> The solution is to make start alignment match the alignment outside the 
> paragraph if the paragraph's directionality is determined from its content and 
> its content is all-neutral.
> 
> In the context of CSS, the relevant spec is that of the start and end edges of 
> a line box whose containing block has ‘unicode-bidi: plaintext’ 
> (https://www.w3.org/TR/css-text-3/#bidi-linebox). It already makes an 
> exception for an empty line box, which "takes its inline base direction from 
> the preceding line box (if any), or, if this is the first line box in the 
> containing block, then from the ‘direction’ property of the containing block." 
> I think that this exception should be broadened to an all-neutral line box.

Hi Aharon,
The CSSWG tracked your issue here at
   https://github.com/w3c/csswg-drafts/issues/4405
and it was discussed at the last F2F, minutes here:
   https://lists.w3.org/Archives/Public/www-style/2020Feb/0019.html

With regards to concerns with your last suggestion [apply resolved 
directionality of the previous line box to an all-neutral line box], one 
concern was inconsistency in handling all-neutral content before and after a 
strong paragraph (particularly at the start of the plaintext block); and 
another concern was the divergence of the base directionality wrt bidi 
reordering vs the base directionality for alignment.

I was asked to reach out to you to ask if this is still something you want 
changed, and if so, if you would mind reading through the concerns and explain 
what you think is the best way forward and why.

(And of course, if anyone else on this thread has feedback on the issue, CSSWG 
would be interested to hear that, too.)

Thanks~
~fantasai

//cc public-i18n-bidi@w3.org & www-style@w3.org

Received on Friday, 3 April 2020 22:27:23 UTC