From b871676def4bda9be5f280ab6b6e80a59db5628c Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 2 Sep 2023 16:43:13 -0700 Subject: [PATCH] Fix sidebar behavior with RTL. --- src/theme/css/chrome.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css index 2acd99c9..b5b7d480 100644 --- a/src/theme/css/chrome.css +++ b/src/theme/css/chrome.css @@ -436,7 +436,7 @@ ul#searchresults span.teaser em { transform: translateX(calc(0px - var(--sidebar-width))); z-index: -1; } -[dir=rtl] .sidebar-hidden .sidebar { +[dir=rtl] #sidebar-toggle-anchor:not(:checked) ~ .sidebar { transform: translateX(var(--sidebar-width)); } .sidebar::-webkit-scrollbar { @@ -450,11 +450,17 @@ ul#searchresults span.teaser em { #sidebar-toggle-anchor:checked ~ .page-wrapper { transform: translateX(var(--sidebar-width)); } +[dir=rtl] #sidebar-toggle-anchor:checked ~ .page-wrapper { + transform: translateX(calc(0px - var(--sidebar-width))); +} @media only screen and (min-width: 620px) { #sidebar-toggle-anchor:checked ~ .page-wrapper { transform: none; margin-inline-start: var(--sidebar-width); } + [dir=rtl] #sidebar-toggle-anchor:checked ~ .page-wrapper { + transform: none; + } } .chapter {