From: Marcel Werk Date: Fri, 18 Dec 2020 14:47:22 +0000 (+0100) Subject: RTL fix for code boxes X-Git-Tag: 5.3.2~34 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29f2ff29b27b8c5c91e13d84aea62330c53ba9f5;p=GitHub%2FWoltLab%2FWCF.git RTL fix for code boxes --- 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);