From 29f2ff29b27b8c5c91e13d84aea62330c53ba9f5 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 18 Dec 2020 15:47:22 +0100 Subject: [PATCH] RTL fix for code boxes --- .../install/files/lib/system/style/StyleCompiler.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index b11be61278..25bff71e82 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -521,7 +521,10 @@ EOT; // force code boxes to be always LTR $content .= "\n/* RTL fix for code boxes */\n"; - $content .= '.codeBox > div > ol > li > span:last-child, .redactor-layer pre { direction: ltr; text-align: left; } .codeBox > div > ol > li > span:last-child { display: block; }'; + $content .= ".redactor-layer pre { direction: ltr; text-align: left; }\n"; + $content .= ".codeBoxCode { direction: ltr; } \n"; + $content .= ".codeBox .codeBoxCode { padding-left: 7ch; padding-right: 0; } \n"; + $content .= ".codeBox .codeBoxCode > code .codeBoxLine > a { margin-left: -7ch; margin-right: 0; text-align: right; } \n"; // write stylesheet for RTL file_put_contents($filename.'-rtl.css', $content); -- 2.20.1