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

Re: per-paragraph auto-direction, a.k.a. dir=uba

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 02 Sep 2010 11:14:21 -0700
Message-ID: <4C7FE97D.8070309@inkedblade.net>
To: "Aharon (Vladimir) Lanin" <aharon@google.com>
CC: Ehsan Akhgari <ehsan@mozilla.com>, Behdad Esfahbod <behdad@behdad.org>, Adil Allawi <adil@diwan.com>, Shachar Shemesh <shachar@shemesh.biz>, public-i18n-bidi@w3.org, "Phillips, Addison" <addison@lab126.com>
On 09/02/2010 01:02 AM, Aharon (Vladimir) Lanin wrote:
> But, unless I misunderstand you, we have the problem I brought up
> originally, as in:
>
> <pre dir=uba>
>
> an ltr line (and thus uba paragraph).<input type=button
> value="b1" style="margin-start:20px" /><input type=button
> value="b2" style="margin-start:20px" />
>
> AN RTL LINE (AND THUS UBA PARAGRAPH).<input type=button
> value="B3" style="margin-start:20px" /><input type=button
> value="B4" style="margin-start:20px" />
>
> </pre>
>
> B3 and B4 would inherit the CSS direction of their parent, i.e. <pre
> dir=uba> element, which would be ltr due to the way its content
> begins. Will B3 and B4's margins be on their left or their right? If
> it's on the left, as per their CSS direction, they will not do what
> the author intends, which is to put a bit of space between the button
> and what precedes it. And if it's on the right, the definition of start
> and end becomes quite esotoric, no longer depending on the CSS
> direction, but on the paragraph direction, which scripts can't even access.

margin-start would be margin-left, since those input elements have
inherited an ltr direction. If the author wants proper control of
presentation, he should be using proper markup. Note that the lack
of spacing problem is present in

AN RTL LINE (AND THUS UBA PARAGRAPH).<input type=button
value="B3" style="margin-start:20px" /><input type=button
value="B4" style="margin-start:20px" /> MORE RTL TEXT

regardless of whether the paragraph direction is set correctly or not.

Note also that <pre> is not allowed to contain <input> elements.

Also, I should mention, it might make sense for dir=uba to be restricted
to <pre> and <textarea> elements (where it would do per-paragraph) and
to inline elements (where it would be the same as first-strong).

~fantasai
Received on Thursday, 2 September 2010 18:15:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 2 September 2010 18:15:05 GMT