Some updates related to RTL and HTML modules. You can check Bug 1305007
<
https://bugzilla.mozilla.org/show_bug.cgi?id=1305007#c13> for more details.
TLDR: When testing RTL with devtools and ForceRTL, you now have to close
and reopen devtools to make sure HTML modules use the proper direction.
# Supporting RTL
HTML documents need dir="rtl" in order to force the direction on their
content. The
toolbox will attempt to set this attribute when loading a new module, if
this module
is hosted in a HTML document.
So normally, after migrating a devtools module to HTML, it should support
RTL out
of the box!
It's still worth mentioning that the css selector :-moz-locale-dir(rtl) is
only applied in XUL documents. Some selectors might have to be updated from
:-moz-locale-dir(rtl)
to :dir(rtl).
# Testing RTL
At the moment, HTML modules are not dynamically updated if you are changing
the
direction (using Force RTL extension, or setting intl.uidirection
preference).
Please remember to re-open devtools whenever you flip to RTL while testing.
We are working on Force RTL to allow it to update devtools HTML modules
dynamically [1].
Hopefully the next release of Force RTL should no longer require you to
restart
devtools. If you are using preferences instead of Force RTL, please give it
a try. If
you have good reasons to prefer preferences over Force RTL, please let me
know.
Our wiki has been updated with the testing information [2] (if you know any
other doc I should update, let me know!)
[1]
https://github.com/mikedeboer/ForceRTL/pull/6 &
https://github.com/mikedeboer/ForceRTL/pull/8
[2]
https://wiki.mozilla.org/DevTools/CSSTips#Localization
Julian