- From: Tex Texin <tex@i18nguy.com>
- Date: Wed, 05 Nov 2003 11:39:24 -0500
- To: fantasai <fantasai@escape.com>
- Cc: www-style@w3.org, W3c I18n Group <w3c-i18n-ig@w3.org>
Hi, In the GEO FAQ, http://www.w3.org/International/questions/qa-bidi-space.html the example had a space before the RTL element, and so spaces at the front of the RTL element are removed, because the CSS algorithm intentionally ignores bidi- http://www.w3.org/TR/2003/WD-CSS21-20030915/text.html#q9 top of 16.6.1 : "For each inline (including anonymous inlines), the following steps are performed, ignoring bidi formatting characters as if they were not there:" 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.) So the space in front of the rtl element gets removed by part 2 of step 4 of the css algorithm: "2. any space (U+0020) following another space (U+0020) — even a space before the inline, if that space also has 'white-space' set to 'normal', 'nowrap' or 'pre-line' — is removed. " 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. tex fantasai wrote: > > Tex Texin wrote: > > fantasai wrote: > > > http://www.w3.org/TR/2003/WD-CSS21-20030915/text.html#q9 > > ... > > > The problem is best avoided by keeping start and end tags close to the text: > > > by not putting spaces at the start and end of inline elements. > > > > The FAQ that the GEO group wrote on this suggested "remove all space before the > > end tag of the inline element, or remove the dir attribute (if appropriate)." > > > > Here it makes sense to remove unnecessary embedding, not to remove explicit > > overrides. > > In this example, yes, because B is one character -- and in any case, it's not > rtl. However, I believe the example was intended to represent more complex > character sequences in which an embedding may well be necessary. An Arabic > quotation with a Latin name mentioned in the middle, for example. > > > Also, the key impact is on spaces before end tags, not beginning spaces. > > some<rtl> TEXT</rtl> where does that first space go? > > ~fantasai -- ------------------------------------------------------------- Tex Texin cell: +1 781 789 1898 mailto:Tex@XenCraft.com Xen Master http://www.i18nGuy.com XenCraft http://www.XenCraft.com Making e-Business Work Around the World -------------------------------------------------------------
Received on Wednesday, 5 November 2003 11:40:39 UTC