Le 06/11/2015 03:53, Jim Porter a écrit : > I have two specific issues with RTL that I haven't found a great > solution for, and which aren't covered very well by existing articles. > If anyone could point me in the right direction, I'd appreciate it. > > First, balancing parentheses. If you have LTR text like "Title > (Subtitle)" in an RTL environment, it will end up looking like "(Title > (Subtitle" because the closing paren is rendered according to RTL rules, > while the opening one is LTR. I know we can fix this with the <bdi> > element*, but that doesn't solve the second issue.
I'd use <bdi> or "dir=auto" on already existing markup. > > Second, ellipses. How do I ensure that the ellipsis is on the correct > side of the text? Again, if we have LTR text like "Long name here" in an > RTL environment, it usually ends up looking like "...Long name", which > is backwards. Ellipsis are hard. See https://bugzilla.mozilla.org/show_bug.cgi?id=883884 But in the general case you can use our trick: https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/views/shared/style/sms.css#L254-L262 Do a "git grep ellipsis-dir-fix" in Gaia and you'll find some examples. It's not very clean but it works good enough for most cases. -- Julien
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev-fxos mailing list [email protected] https://lists.mozilla.org/listinfo/dev-fxos

