Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions scss/_drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,20 @@ $drawer-backdrop-tokens: defaults(
&:where(.drawer-start) {
transform: translateX(calc(-100% - var(--drawer-inset)));

:root:dir(rtl) & {
// Wrap :root:dir(rtl) in :where() so this rule stays at the same
// specificity as the LTR off-canvas transform. A bare :root:dir(rtl)
// ancestor out-specs `[open] { transform: none }`, which keeps the
// drawer translated off-screen in RTL while the backdrop still shows.
// See https://github.com/twbs/bootstrap/issues/43340
:where(:root:dir(rtl)) & {
transform: translateX(calc(100% + var(--drawer-inset)));
}
}

&:where(.drawer-end) {
transform: translateX(calc(100% + var(--drawer-inset)));

:root:dir(rtl) & {
:where(:root:dir(rtl)) & {
transform: translateX(calc(-100% - var(--drawer-inset)));
}
}
Expand Down
Loading