Created by: DigitalKrony
On behalf of Microsoft, I'm submitting this pull-request.
We have taken Bootstrap 4.x on as a dependency for a project, however, we have requirements for our websites to work in an international arena as well as maintain perf goals and an easy dev story. To that end, the best case in order to align these things is to integrate internationalization directly into Bootstrap. You'll find the appropriate update within.
The chages in the files below simply add in the dir
attribute to the HTML tag to allow ease of testing. While testing the RTL story wihtin the doc site, these must be set to "rtl"
.
- site > _layouts >
- default.html
- docs.html
- home.html
- redirect.html
The update to the SCSS is realativly simple. I've added three variables to the _variables.scss
.
- $dir:String = ltr (default) || rtl
- $left:String = left (default) || right (is set based on $dir)
- $right:String = right (default) || left (is set based on $dir)
These three variables work in conjunction with eachother. By !default
$dir
is set to ltr
. Following this varaible, there's $left
and $right
. These two variables are set via a function (set-dir(left|right)
) base on the value of $dir
for ease of use. The $dir
variable also sets a global direction: $dir
style decloration to capture finer style requirements for things like inputs and sudo elements.