Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to do RTL aware xul? <grid><rows><row> for example

13 views
Skip to first unread message

Axel Hecht

unread,
Sep 6, 2007, 8:05:51 AM9/6/07
to
Hi,

I realized that I'm not sure how to create a grid that works right for
RTL languages. My current question,
https://bugzilla.mozilla.org/show_bug.cgi?id=393820, is about a <grid>,
but this is true for other elements, too.

We have chromedir attributes in our codebase, we have dir attributes in
the xul spec. Plus numerous hacks in intl.css for our RTL localizations.

Thus, what's the "right" (TM) way to do it?

Axel

Neil

unread,
Sep 6, 2007, 11:36:25 AM9/6/07
to
Axel Hecht wrote:

The "right" way is that intl.css should set direction: rtl; which should
automatically affect all elements. Since we don't flip images any image
elements have to have a chromedir attribute which the theme CSS can then
use to flip the image. The dir attribute corresponds to
-moz-box-direction which works differently (it doesn't inherit for
instance).

--
Warning: May contain traces of nuts.

Phil Ringnalda

unread,
Oct 24, 2007, 12:19:43 AM10/24/07
to
Neil wrote:

> Axel Hecht wrote:
>
>> https://bugzilla.mozilla.org/show_bug.cgi?id=393820, is about a
>> <grid>, but this is true for other elements, too.
>
> The "right" way is that intl.css should set direction: rtl; which should
> automatically affect all elements. Since we don't flip images any image
> elements have to have a chromedir attribute which the theme CSS can then
> use to flip the image. The dir attribute corresponds to
> -moz-box-direction which works differently (it doesn't inherit for
> instance).

Though the right way doesn't actual enter the equation for bug 393820 -
the problem there is a box with three children, two of which together
make up a uri-element, and thus should be ltr even in rtl. So the right
way, the trunk way, is a parent for those two that sets direction: ltr.
The wrong way, the branch way, the intl.css way, really ought to be
setting -moz-box-ordinal-group on them, but it seems to have no effect.

Phil Ringnalda

Neil

unread,
Oct 24, 2007, 6:54:18 AM10/24/07
to
Phil Ringnalda wrote:

> The wrong way, the branch way, the intl.css way, really ought to be
> setting -moz-box-ordinal-group on them, but it seems to have no effect.

IIRC dir: rtl; takes affect after -moz-box-ordinal group (but don't
think of it as a group, the ordinals really should all be different), so
if your children are numbered 2, 3, 1 then they will be 1, 3, 2 under
dir: rtl.

0 new messages