Here’s the Phoxygen contribution to the RTL/BiDi CSS Guidelines section
that Sam added to the wiki:
https://wiki.mozilla.org/Gaia/CSS_Guidelines
TL;DR:
• in order to mirror UI elements in RTL, some direction-sensitive
rules in CSS can be used, e.g.:
-moz-{margin,padding,border}-{start,end}
{margin,padding,border}-inline-{start,end} (Gecko 41+)
• avoid using 4-value shorthands with margin/padding/border, because
they imply that the left and right edges are different (asymmetrical):
margin: 1rem; /* symmetrical */
margin: 1rem 2rem; /* symmetrical */
margin: 1rem 2rem 3rem; /* symmetrical */
margin: 1rem 2rem 3rem 4rem; /* direction-specific! */
margin: 1rem 2rem 3rem; margin-inline-start: 4rem;
• this cannot be used everywhere: some properties have no start/end
counterpart, and it won’t work with elements carrying a `dir="auto"`
attribute anyway. In such cases, the `html[dir="{ltr,rtl}"]` approach is
the way to go.
Feel free to share your feedback. :-)
Cheers,
:kazé