mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-26 06:44:35 +02:00
feat(RTL): implement RTL
Using RTLCSS directives, renaming things to use logical names and following best practices.
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
getElementFromSelector,
|
||||
getTransitionDurationFromElement,
|
||||
isVisible,
|
||||
isRTL,
|
||||
reflow,
|
||||
typeCheckConfig
|
||||
} from './util/index'
|
||||
@@ -435,11 +436,11 @@ class Modal extends BaseComponent {
|
||||
const isModalOverflowing =
|
||||
this._element.scrollHeight > document.documentElement.clientHeight
|
||||
|
||||
if (!this._isBodyOverflowing && isModalOverflowing) {
|
||||
if ((!this._isBodyOverflowing && isModalOverflowing && !isRTL) || (this._isBodyOverflowing && !isModalOverflowing && isRTL)) {
|
||||
this._element.style.paddingLeft = `${this._scrollbarWidth}px`
|
||||
}
|
||||
|
||||
if (this._isBodyOverflowing && !isModalOverflowing) {
|
||||
if ((this._isBodyOverflowing && !isModalOverflowing && !isRTL) || (!this._isBodyOverflowing && isModalOverflowing && isRTL)) {
|
||||
this._element.style.paddingRight = `${this._scrollbarWidth}px`
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user