4 ms·
I'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 { margi
by msoad 11y ago
I'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.