W3C home > Mailing lists > Public > www-html@w3.org > March 2010

Re: bidi embedding for block-level elements

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 17 Mar 2010 18:33:42 -0700
Message-ID: <4BA182F6.2090101@inkedblade.net>
To: Ian Hickson <ian@hixie.ch>
CC: Simon Montagu <smontagu@smontagu.org>, www-html@w3.org, 'WWW International' <www-international@w3.org>, "public-i18n-core@w3.org" <public-i18n-core@w3.org>, "www-style@w3.org" <www-style@w3.org>
On 03/17/2010 04:01 PM, Ian Hickson wrote:
> On Mon, 18 Jan 2010, fantasai wrote:
>> On 01/14/2010 12:49 AM, Simon Montagu wrote:
>>> On 01/11/2010 11:35 PM, fantasai wrote:
>>>> On 11/26/2009 10:54 PM, Simon Montagu wrote:
>>>>>
>>>>> I assume your Gecko example is using a very recent version of
>>>>> Gecko, such as a nightly build or a beta of Firefox 3.6? I fixed
>>>>> this issue only a few months ago.
>>>>>
>>>>> The HTML standard does specify what to do in this case, see
>>>>> http://www.w3.org/TR/REC-html40/struct/dirlang.html#style-bidi:
>>>>>
>>>>> "When a block element that does not have a dir attribute is
>>>>> transformed to the style of an inline element by a style sheet,
>>>>> the resulting presentation should be equivalent, in terms of
>>>>> bidirectional formatting, to the formatting obtained by explicitly
>>>>> adding a dir attribute (assigned the inherited value) to the
>>>>> transformed element."
>>>>>
>>>>> In practice, however, since browsers are not consistent, authors
>>>>> will have to use CSS properties to achieve the expected results.
>>>>
>>>> Does this mean applying "unicode-bidi: embed" to all block-level
>>>> elements? Because that seems like it fulfill those requirements.
>>>
>>> I was thinking in terms of applying "unicode-bidi: embed" ad hoc
>>> whenever applying "display: inline" to a specific element, but
>>> applying it wholesale to all block-level elements will also work, of
>>> course.
>>
>> In that case, I suggest the we add it to the sample default style sheet
>> for HTML 4 in the CSS2.1 appendix, and recommend the HTMLWG add some
>> wording about block-level elements defining bidi embedding boundaries to
>> the HTML5 spec (and perhaps using CSS's "unicode-bidi: embed" rule as an
>> example).
>
> Can you confirm what rule should be added to the HTML5 recommended style
> rules? This is an area where this has changed a lot over time (e.g. CSS2
> used to have something like this then it was removed) so I'd like to make
> sure I get this exactly right and that everyone agrees it's the right
> thing to do.

<selector representing all HTML5 block-level elements> {
   display: block;      /* I assume you already have this somewhere */
   unicode-bidi: embed; /* This is the new rule to add. */
}

<selector representing all HTML5 list-item elements> {
   display: list-item;  /* Assumed to exist already */
   unicode-bidi: embed; /* This is the new rule to add. */
}

title, table, tbody, thead, tfoot, tr, td, th {
   unicode-bidi: embed;
}

If you're defaulting anything to "display: inline-block", then
you probably also want "unicode-bidi: embed" there, too.

~fantasai
Received on Thursday, 18 March 2010 01:34:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:17 GMT