RTL fix for code boxes
authorMarcel Werk <burntime@woltlab.com>
Fri, 18 Dec 2020 14:47:22 +0000 (15:47 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 18 Dec 2020 14:47:22 +0000 (15:47 +0100)
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php

index b11be612789cc398e8f3d4789dc3cc7d44383a15..25bff71e8215cf38aa7a539754b7792b227c6c50 100644 (file)
@@ -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);