W3C home > Mailing lists > Public > www-international@w3.org > October to December 2012

[css3-writing-modes] i18n-ISSUE-167: Example of Bidirectional Text

From: Richard Ishida <ishida@w3.org>
Date: Wed, 17 Oct 2012 18:01:43 +0100
Message-ID: <507EE477.7030505@w3.org>
To: W3C Style <www-style@w3.org>, www International <www-international@w3.org>
Example of Bidirectional Text
http://dev.w3.org/csswg/css3-writing-modes/#bidi-example

I've been meaning to say for some years now that this is a very bad 
example. It should use dedicated bidi specific markup (see 
http://www.w3.org/International/questions/qa-bidi-css-markup#markup "You 
should therefore use dedicated bidi markup whenever it is available. Do 
not simply attach CSS styling to a general element to achieve the 
effect."). Here is an proposal for an alternative version of parts of 
the example.

<HEBREW dir="rtl">
<PAR>HEBREW1 HEBREW2 english3 HEBREW4 HEBREW5</PAR>
<PAR>HEBREW6 <EMPH>HEBREW7</EMPH> HEBREW8</PAR>
</HEBREW>
<ENGLISH dir="ltr">
<PAR>english9 english10 english11 HEBREW12 HEBREW13</PAR>
<PAR>english14 english15 english16</PAR>
<PAR>english17 <HE-QUO dir="rtl">HEBREW18 english19 HEBREW20</HE-QUO></PAR>
</ENGLISH>

/* Rules for bidi */
*[dir=rtl] {direction: rtl; unicode-bidi: embed;}
*[dir=ltr] {direction: ltr; unicode-bidi: embed;}

These generic style rules should be what goes in the separate style sheet.

Also, we recommend not using bidi markup unless you need to change the 
base direction, so if this document had an overall base direction of ltr 
(either by default, or via <ROOT dir="ltr">), you wouldn't need to have 
the dir="ltr" after ENGLISH. It may be worth adding a note to that effect.

It's also confusing that the markup is in uppercase, since the uppercase 
is used to indicate Hebrew characters. Unless you are trying to make a 
point that the markup uses hebrew element names (which I don't think is 
necessary here), they should probably be in lowercase.





-- 
Richard Ishida
Internationalization Activity Lead
W3C (World Wide Web Consortium)

http://www.w3.org/International/
http://rishida.net/
Received on Wednesday, 17 October 2012 17:02:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 17 October 2012 17:02:11 GMT