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

rlo text should not be automatically right-aligned

From: Richard Ishida <ishida@w3.org>
Date: Wed, 1 Nov 2006 16:59:16 -0000
To: <www-international@w3.org>, <www-style@w3.org>
Cc: "'Steven Pemberton'" <steven.pemberton@cwi.nl>
Message-ID: <00fd01c6fdd7$11d2a010$6501a8c0@w3cishida>

See http://www.w3.org/International/notes/notes-rlo-blocks-css.php

Background (repeated)

These notes relate to the handling of right-to-left and
left-to-right overrides in CSS and to some extent in HTML and xHTML.
They draw on information in the following mail threads:
  * [18]bidi-override scope in CSS2 and CSS 2.1

[18] http://www.w3.org/Search/Mail/Public/search?type-index=www-style&index-type=t&keywords=bidi-override+scope+in+CSS2+and+CSS+2.1&search=Search

Suppose we have the following code in an XML application such as
XHTML2, embedded in content with a base direction of ltr:
<div dir="rlo">Some inline text
and more inline text on another line
<p>A paragraph of text</p>
Some more <em>inline</em> text

and the following CSS style in the same document:
*[dir="lro"] { unicode-bidi: bidi-override; direction: ltr}
*[dir="rlo"] { unicode-bidi: bidi-override; direction: rtl}

rlo text should not be automatically right-aligned

Given the CSS and markup above, the div when displayed would
currently be right aligned. This is due to the presence of the
[20]direction property, the value of which affects the initial
setting of [21]text-align.

[20] http://www.w3.org/TR/CSS21/visuren.html#propdef-direction
[21] http://www.w3.org/TR/CSS21/text.html#propdef-text-align

I think that the alignment of the text should be independent of the
application of an override.

For example, if I have some English text that is discussing the
order of characters in memory, and I add an example in a blockquote,
I would not expect the example text to be right-aligned. In the
absence of an inherited text-align property, the following markup:
<p>The text is stored in logical order, so
the order of characters in memory would be:</p>
<blockquote>פעילות הבינאום, W3C</blockquote>

would result in the blockquote content being displayed

To make the blockquote left-aligned, I would currently have to add
the CSS text-align: left to the blockquote, or an enclosing element.

This perhaps means that, rather than unicode-bidi: bidi-override, we
should have unicode-bidi: rlo/lro. The user could then apply the
direction property if they wanted to change the default alignment.
This seems to be a more constent use of the direction property,
which is currently fulfilling two roles when used with
unicode-bidi:override: a. setting the base direction of the block,
b. indicating the desired direction of the override.

This approach would also provide consistency with the expectations
of HTML users, who use the <bdo> inline element for directional
overrides. The code:
<p>The text is stored in logical order, so
the order of characters in memory would be:</p>
<blockquote><bdo dir="ltr">פעילות הבינאום, W3C</bdo></blockquote>

would produce a blockquote with text that is left-aligned.

Richard Ishida
Internationalization Lead
W3C (World Wide Web Consortium)

Received on Wednesday, 1 November 2006 16:59:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 September 2016 22:37:27 UTC