Re: Alignment of paragraphs with unicode-bidi: plaintext

On 10/30/2011 09:28 PM, Simon Montagu wrote:
> As far as I can see, there is no explicit specification in CSS Writing Modes Module Level 3 of what effect "unicode-bidi:
> plaintext" should have on the default alignment of paragraphs.
>
> When implementing "unicode-bidi: plaintext" for Gecko, I took it for granted that each paragraph in the element would
> determine its directionality by the heuristic in the UBA, and then determine the start of the line box depending on the
> directionality of the paragraph.
>
> I just noticed that recent versions of Chrome behave differently: directionality is determined for each paragraph separately,
> but alignment is determined by the first paragraph in the element, and all subsequent paragraphs get the same alignment.
>
> As I said, there doesn't seem to be anything in the spec to say which approach is correct. I think the behaviour in Gecko is
> more intuitive and useful, but then I would, wouldn't I? Either way, it is probably worth adding something to the spec to make
> it explicit.

Fixed in the spec, per Aharon's recommendation:
   http://dev.w3.org/csswg/css3-text/#text-align

   # The start and end edges of line boxes are determined by the inline
   # base direction per "paragraph", where in this case the "paragraph"
   # is all consecutive line boxes not separated by a forced line break
   # or block boundary. In most cases, this means referring to the
   # ‘direction’ property of the containing block. In the case of
   # ‘unicode-bidi: plaintext’, however, this uses the implied inline
   # base direction of the "paragraph" (i.e. the based direction that
   # is used for bidi reordering).

And there's an example afterward.

Simon, can you look this over and let me know if it matches your
implementation?

~fantasai

Received on Friday, 17 February 2012 17:42:40 UTC