W3C home > Mailing lists > Public > public-i18n-core@w3.org > July to September 2006

RE: bidi-override scope in CSS2 and CSS 2.1

From: Paul Nelson (ATC) <paulnel@winse.microsoft.com>
Date: Fri, 15 Sep 2006 06:15:00 -0700
Message-ID: <49C257E2C13F584790B2E302E021B6F91123ABB4@winse-msg-01.segroup.winse.corp.microsoft.com>
To: Martin Duerst <duerst@it.aoyama.ac.jp>, Richard Ishida <ishida@w3.org>, Bert Bos <bert@w3.org>
CC: <www-style@w3.org>, <public-i18n-core@w3.org>, Masayasu Ishikawa <mimasa@w3.org>

The Bidi in CSS works with two properties in tandem...

direction: ltr|rtl|inherit; 
unicode-bidi: normal|embed|bidi-override;

The 'direction' in bidi layout impacts the default reading
direction/layout order on the block level (e.g. which side does the text
flow begin on? Left? Or, Right? Thus, applying dir=rlo on a block level
is only impact the content of the block level element, with the
direction inherited from the parent. And thus, I suppose, the way the
wording is spelled out. 

An 'rlo' could be applied in either a left-to-right or right-to-left
block context and does not impact the actual initial block bidi level.
For the content of a block the 'rlo' would make sense...although it
would not normally be used as it only effects right to left text. The
example below with ltr text is not at all impacted.

CSS properties are defined correctly for adherance to the Unicode
Bidirectional Algorithm. As weird as the wording seems, it does seem to
follow the bidi algorithm.

Perhaps it was written as it is for visual Hebrew or some other usage.

Regards,

Paul Nelson



-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
Behalf Of Martin Duerst
Sent: Friday, September 15, 2006 3:13 PM
To: Richard Ishida; 'Bert Bos'
Cc: www-style@w3.org; public-i18n-core@w3.org; 'Masayasu Ishikawa'
Subject: RE: bidi-override scope in CSS2 and CSS 2.1


At 19:08 06/09/11, Richard Ishida wrote:
>Thanks Martin for saying what I was thinking.  I also wonder why this 
>is so, and wishing I'd spotted it earlier.
>
>I know HTML's bdo element is inline only, but XHTML 2's rlo attribute 
>can be applied to block level elements, and I can't see why you'd have 
>to add extra inline markup if you wanted to override the text in say 
>two or three contiguous paragraphs using CSS.

To be fair, you wouldn't need additional markup, just additional CSS
rules. But it still does not make any sense the way it currently seems
to be defined.

Can anybody from the CSS WG try to explain what happened?

Regards,      Martin.

>In fact, I think this could also lead to some confusing results given 
>code such as:
>
><div dir="rlo">Inline only text.
>     <p>Some text in a block.</p>
>     <p>Some more text.</p>
>       Some more inline text.
>     </div>
>
>Can we change it?
>
>RI
>
>
>============
>Richard Ishida
>Internationalization Lead
>W3C (World Wide Web Consortium)
>
>http://www.w3.org/People/Ishida/
>http://www.w3.org/International/
>http://people.w3.org/rishida/blog/
>http://www.flickr.com/photos/ishida/
> 
>
>> -----Original Message-----
>> From: Martin Duerst [mailto:duerst@it.aoyama.ac.jp]
>> Sent: 10 September 2006 20:14
>> To: Bert Bos; Richard Ishida
>> Cc: www-style@w3.org; public-i18n-core@w3.org
>> Subject: Re: bidi-override scope in CSS2 and CSS 2.1
>> 
>> [I'm mostly offline at the moment due to travel]
>> 
>> Given the spec text that Richard has copied in his email, what Bert 
>> says below seems to be correct, but I have tried to make some sense 
>> of it, and can't. What's the reason for having bidi-override apply to

>> the direct inline descendents of an element only? It doesn't seem to 
>> make sense from an user point of view, and it doesn't seem to make 
>> sense from an implementer's point of view, and I can't immagine that 
>> we designed it that way when we designed it (which was
>> 9 or 10 years ago. Any explanations, anybody?
>> 
>> Regards,    Martin.
>> 
>> At 01:44 06/09/09, Bert Bos wrote:
>> >
>> >On Friday 08 September 2006 17:57, Richard Ishida wrote:
>> >> Suppose my stylesheet says that where I have dir="rlo" I
>> apply a bidi
>> >> override to my (say) XHTML2 text.
>> >
>> >You mean the style sheet has the following?
>> >
>> >    [dir=rlo] { unicode-bidi: bidi-override }
>> >
>> >>
>> >> CSS 2 says:
>> >
>> >Forget about the old CSS2 Rec. It is progressively being obsoleted 
>> >first by the revised edition ("CSS 2.1") and then by the
>> various CSS3
>> >modules as they arrive. (Unfortunately, CSS 2.1 is still a
>> WD, but in
>> >practice it has much fewer bugs than the old Rec.)
>> >
>> >> CSS 2.1 says:
>> >>
>> >> "For inline-level elements this creates an override. For
>> block-level,
>> >> table-cell, table-caption, or inline-block elements this
>> creates an
>> >> override for inline-level descendents not within another
>> block-level,
>> >> table-cell, table-caption, or inline-block element."
>> >>
>> >> Does that mean that only the text "Inline only text." in
>> this example
>> >> below actually has the bidi algorithm overridden?
>> >>
>> >> <div dir="rlo">Inline only text.
>> >>      <p>Some text in a block.</p>
>> >>      <p>Some more text.</p>
>> >>      </div>
>> >
>> >Correct. (Under the assumption that the Ps are block-level,
>> which they
>> >normally are.)
>> >
>> >
>> >
>> >Bert
>> >-- 
>> >  Bert Bos                                ( W 3 C ) 
>> http://www.w3.org/
>> >  http://www.w3.org/people/bos
W3C/ERCIM
>> >  bert@w3.org                             2004 Rt des 
>> Lucioles / BP 93
>> >  +33 (0)4 92 38 76 92            06902 Sophia Antipolis 
>> Cedex, France
>> 
>> 
>> #-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
>> #-#-#  http://www.sw.it.aoyama.ac.jp       
>> mailto:duerst@it.aoyama.ac.jp     
>> 


#-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-#  http://www.sw.it.aoyama.ac.jp       mailto:duerst@it.aoyama.ac.jp
Received on Friday, 15 September 2006 13:14:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 October 2008 10:18:51 GMT