5 ms·
Does anyone know why they don't want to support right-to-left? I've seen tons of questions and posts about it over the years so I'm surprised that even with the
by dlandis 11y ago
Does anyone know why they don't want to support right-to-left? I've seen tons of questions and posts about it over the years so I'm surprised that even with the next major release they aren't addressing it. Maybe I'm missing a perspective here though -- don't other people think that rtl should be a core capability of a framework like this? I'm also curious whether accessibility will be improved in 4.x.
- rattray 11y agoJust to be clear, you're talking about the text direction, for languages like Hebrew and Arabic? (We Americans are typically blissfully unaware that other languages are actually used on the internet - this is a great opportunity to talk about the importance of i18n)
- duaneb 11y agoYup. Though it's not like it's hard to find samples and compare them. Source: I write typesetting software.
- msoad 11y agoI'm curios to know what doesn't work in rtl? Does bootstrap uses `margin-left` and stuff like that? It should be simple to fix it .some-class { margin-left: 1em; &[dir="rtl"] { margin-right: 1em; } }
- ivanca 11y agoIt is a little more complicated because you have to omit the previous rule as well (and overriding it may interfere with other CSS rules), so it should be: .some-class { &[dir="rtl"] { margin-right: 1em; } &:not([dir="rtl"]) { margin-left: 1em; } }
- realityking 11y agoPart of the problem is, that it's highly undesirable having to mark every node as rtl, when it should just be inerited. Eventually (https://developer.mozilla.org/en-US/docs/Web/CSS/%3Adir https://developer.mozilla.org/en-US/docs/Web/CSS/%3Adir) will be able to write it like this: .some-class { &:dir(rtl) { margin-right: 1em; } &:dir(ltr) { margin-left: 1em; } } Right now it's probably easiest to load an additional stylesheet when a RTL language is used.
- ZeroGravitas 11y agoThey did propose to do RTL in version 3. They used some CSS flipping tech to do the bulk of the work. However, it got abandoned, as far as I can tell from the outside, one of the people who manually creates an RTL version of Bootstrap basically called them imperialists for trying to automate something that was too precious to automate as it couldnt be 100% perfect and they caved to the pressure. This is annoying for those that want to integrate CSS flipping into their own workflow. Also, accessibility has been improving a lot recently, with PayPal and others contributing back and they announced Patrick Lauke would join their team to work on this.