From 098f09b6387486c07c8eaba99c2705bfefd276f4 Mon Sep 17 00:00:00 2001 From: Michael Hawkins Date: Tue, 3 Nov 2020 15:24:48 +0800 Subject: [PATCH] MDL-68749 theme: Fix bootstrap toggle switches in RTL layout Co-authored-by: Bas Brands --- theme/boost/scss/moodle/bootstrap-rtl.scss | 6 +++++- theme/boost/style/moodle.css | 3 +++ theme/classic/style/moodle.css | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/theme/boost/scss/moodle/bootstrap-rtl.scss b/theme/boost/scss/moodle/bootstrap-rtl.scss index 53f7c3e1c0e..6c54f041ff6 100644 --- a/theme/boost/scss/moodle/bootstrap-rtl.scss +++ b/theme/boost/scss/moodle/bootstrap-rtl.scss @@ -23,4 +23,8 @@ left: 0; text-align: right; } -*/ \ No newline at end of file +*/ + +.dir-rtl .custom-switch .custom-control-input:checked ~ .custom-control-label::after { + transform: translateX(-($custom-switch-width - $custom-control-indicator-size)); +} diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index e6be80ac9d2..a0a5d26e667 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -9630,6 +9630,9 @@ input[disabled] { text-align: right; } */ +.dir-rtl .custom-switch .custom-control-input:checked ~ .custom-control-label::after { + transform: translateX(-0.9375rem); } + /* core.less */ #region-main { overflow-x: auto; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index d9acec11ae2..a89a79ad610 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -9834,6 +9834,9 @@ input[disabled] { text-align: right; } */ +.dir-rtl .custom-switch .custom-control-input:checked ~ .custom-control-label::after { + transform: translateX(-0.75rem); } + /* core.less */ #region-main { overflow-x: auto;