W3C home > Mailing lists > Public > www-style@w3.org > June 2010

[CSS21] bidi, text-align, and list markers

From: Bert Bos <bert@w3.org>
Date: Wed, 2 Jun 2010 15:14:25 +0200
To: W3C style mailing list <www-style@w3.org>
Message-Id: <201006021514.25237.bert@w3.org>
I'm wondering if it too late to undo two bidi-related changes to CSS2 
that we decided two years ago ('list-style') and 3½ years ago 
('text-align)...

The old CSS2 of 1998 said (like CSS1 before it) that the initial value 
of 'text-align' was either 'left', 'right', 'center' or 'justify', 
depending on the writing mode and the UA. Thus the root element is 
magic, but all other elements inherit normally. (In CSS1 we needed that 
magic, because selectors weren't powerful enough, and CSS2 just kept it 
unchanged, just in case a UA wanted to apply special knowledge about a 
document that wasn't expressible in selectors.)

But late in 2006 we changed that. We decided that, as long as the author 
doesn't set an explicit 'text-align' all elements will be as magic as 
the root element. I don't remember the exact arguments (maybe we 
expected people to set DIR on BODY instead of HTML?). In effect we 
added a fifth value to the 'text-align' property[1] that doesn't have a 
name in CSS2 (it was going to be be called 'initial' in CSS3) but can 
be inherited.

[1] 
http://www.w3.org/TR/2009/CR-CSS2-20090908/text.html#propdef-text-align

Something similar happened with list markers. The old CSS2 explicitly 
left the details of the marker position undefined, but it did contain a 
remark that the marker would be on the right in right-to-left text. It 
didn't say (on purpose, I believe) whether that meant a rtl list item, 
a rtl list, or a rtl document...

In 2008 we decided to make the position of list markers a bit less 
imprecise. We decided that "right-to-left text" in CSS2 should 
mean "right-to-left list item."[2]

[2] 
http://www.w3.org/TR/2009/CR-CSS2-20090908/generate.html#propdef-list-style-position

But a recently published WD of the I18N WG says that both changes were 
wrong[3]. Neither the bullet position nor the alignment should depend 
on an element's own writing direction. E.g., in a bullet list like 
this:

    <ul>
      <li dir=rtl> HEBREW 123
      <li> latin latin
      <li> latin latin
    </ul>

you want the bullets to line up and all the text to be aligned to the 
same side, even though the items have different DIR attributes. Those 
DIR attributes are semantic, they determine the correct reading order, 
they should not (automatically) change the style.

E.g., the above list without the DIR attribute would be rendered close 
to this:

    * WERBEH 123
    * latin latin
    * latin latin

and the DIR attribute is meant to indicate that the desired order is 
actually

    * 123 WERBEH
    * latin latin
    * latin latin

But what the current CR of CSS 2.1 says is this:

                                                    123 WERBEH *
    * latin latin
    * latin latin

[3] http://www.w3.org/TR/2010/WD-html-bidi-20100304/#lists


Can we revert those two changes?



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
Received on Wednesday, 2 June 2010 13:13:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT