From 79c2138955f80194f7999b025cf260893234dac0 Mon Sep 17 00:00:00 2001 From: Simon Cossar Date: Mon, 28 Oct 2019 11:09:42 -0700 Subject: [PATCH] Fix github oneboxes for RTL locales (#8245) --- app/assets/stylesheets/common/base/rtl.scss | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/assets/stylesheets/common/base/rtl.scss b/app/assets/stylesheets/common/base/rtl.scss index 23e56d0e8ff..01735b79cdc 100644 --- a/app/assets/stylesheets/common/base/rtl.scss +++ b/app/assets/stylesheets/common/base/rtl.scss @@ -60,3 +60,33 @@ padding-right: 40px; padding-left: 40px; } + +// Fixes github oneboxes for RTL sites +.rtl aside.onebox.githubblob { + padding: 12px 25px 12px 12px !important; + direction: ltr !important; +} + +.rtl aside.onebox.githubblob .source { + background-position: 0 50% !important; + padding-right: 20px; +} + +.rtl pre.onebox code ol.lines { + margin: 0 0 0 40px !important; +} + +.rtl pre.onebox code ol.lines li:before { + right: -40px; + padding-left: 5px; + padding-right: 0; + text-align: right !important; +} + +.rtl pre.onebox code ol.lines li { + padding-right: 5px; + padding-left: 0; + margin-right: 0; + border-right: 1px solid #cfcfcf; + border-left: none !important; +}