From 553b425e4ae79652d0b436dae24cbfa1e57829bd Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 7 Jun 2017 16:06:03 +0200 Subject: [PATCH] Added some more RTL fixes for code boxes --- com.woltlab.wcf/templates/codeMetaCode.tpl | 4 ++-- .../install/files/lib/system/style/StyleCompiler.class.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/templates/codeMetaCode.tpl b/com.woltlab.wcf/templates/codeMetaCode.tpl index 9a52c8554d..0d1dc81cea 100644 --- a/com.woltlab.wcf/templates/codeMetaCode.tpl +++ b/com.woltlab.wcf/templates/codeMetaCode.tpl @@ -8,9 +8,9 @@ {assign var='lineNumber' value=$startLineNumber} {foreach from=$content item=line} {if $lineNumbers[$lineNumber]|isset} -
  • {@$line}
  • +
  • {@$line}
  • {else} -
  • {@$line}
  • +
  • {@$line}
  • {/if} {assign var='lineNumber' value=$lineNumber+1} diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index 48c2c68b37..0a5d7b6588 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -298,6 +298,10 @@ class StyleCompiler extends SingletonFactory { // convert stylesheet to RTL $content = StyleUtil::convertCSSToRTL($content); + // 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; }'; + // write stylesheet for RTL file_put_contents($filename.'-rtl.css', $content); FileUtil::makeWritable($filename.'-rtl.css'); -- 2.20.1