These changes add support for right-to-left languages. Just for the LESS pre-processor for now, but porting to the others should be trivial.
Unlike some grid systems that support RTL using a compile-time flag (requiring two separate compiled CSS files), this approach leverages an attribute selector that targets a parent element with the "dir" attribute set to rtl. When that attribute/value combination is present, we flip any direction-specific CSS rules (e.g. float, margin-left) to their inverse.
To use the grid system in right-to-left mode, simply add dir="rtl" to any parent element in your document:
These changes add support for right-to-left languages. Just for the LESS pre-processor for now, but porting to the others should be trivial.
Unlike some grid systems that support RTL using a compile-time flag (requiring two separate compiled CSS files), this approach leverages an attribute selector that targets a parent element with the "dir" attribute set to
rtl
. When that attribute/value combination is present, we flip any direction-specific CSS rules (e.g. float, margin-left) to their inverse.To use the grid system in right-to-left mode, simply add
dir="rtl"
to any parent element in your document: