Re: [CSS2.1] Text 16.6.2 Bidirectionality with Whitespace Collapsing

Tex Texin wrote:
 > Or at least I assume ignoring bidi formatting characters and ignoring
 > the directionality settings of elements are the same. (Maybe the css
 > text should clarify that.)

That sentence is there so that spaces separated by bidi formatting
characters will collapse; whether a character follows another character
is independent of reordering. (Think: which side comes first -- left or
right? The order we're talking about here has to be the byte order.)

 > However, your example is different in that the ltr element doesn't have a
 > trailing space.
 >  "some <rtl> TEXT</rtl>"   versus "some<rtl> TEXT</rtl>"
 > So the leading rtl space in your example remains, and therefore when, as stated
 > in the CSS algorithm-
 > "Inlines are laid out, taking bidi reordering into account"
 > the space should be treated as rtl.


 > However, we are talking about collapsing spaces and there is no collapsing
 > going on. If there were multiple spaces at the front of the rtl element they
 > would collapse as expected. Spaces at the end of the ltr element would collapse
 > as described in the geo faq, with the leading rtl space not collapsing into the
 > trailing ltr spaces.

You're missing the point. All of this can be inferred from the rules given in
the CSS spec and the BiDi algorithm. The section 16.6.2 and the FAQ you mention
are there (I believe) primarily for reinforcement -- to draw the readers'
attention to this effect of the processing rules. They're not there to explain
the interaction of bidi and collapsing so much as to explain unexpected whitespace
behavior that results from whitespace and bidi processing.

The best way to avoid such behavior is to avoid leading and trailing spacing in
elements. That is all.


Received on Wednesday, 5 November 2003 14:41:03 UTC