From 8c8bbcbeba51a8143978e1974e03da0e03c2dae2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 1 Jun 2015 23:44:22 +0200 Subject: [PATCH] Improved visuals in RTL --- wcfsetup/install/files/lib/util/StyleUtil.class.php | 7 +++++-- wcfsetup/install/files/style/layout.less | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/util/StyleUtil.class.php b/wcfsetup/install/files/lib/util/StyleUtil.class.php index 57684f7bad..63b6f0cd85 100644 --- a/wcfsetup/install/files/lib/util/StyleUtil.class.php +++ b/wcfsetup/install/files/lib/util/StyleUtil.class.php @@ -63,13 +63,16 @@ final class StyleUtil { $contents = str_replace('border-right-color:', 'border-left-color:', $contents); $contents = str_replace('wcf-border-left-color:', 'border-right-color:', $contents); + // box-shadow + $contents = preg_replace_callback('~box-shadow:\s*(?Pinset)?\s*(?P-)?(?P\d+)~', function($matches) { + return 'box-shadow: ' . $matches['inset'] . ' ' . ($matches['negate'] ? '' : '-') . $matches['number']; + }, $contents); + // clear $contents = preg_replace('/clear:\s*left/', 'wcf-clear:left', $contents); $contents = preg_replace('/clear:\s*right/', 'clear:left', $contents); $contents = str_replace('wcf-clear:left', 'clear:right', $contents); - // todo: clip? - // float $contents = preg_replace('/float:\s*left/', 'wcf-float:left', $contents); $contents = preg_replace('/float:\s*right/', 'float:left', $contents); diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index 543295eaa6..a5ebfea256 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -606,6 +606,9 @@ .transition(width, .2s, ease); > span { + /* fix for Chrome in RTL mode */ + display: inline-block; + position: relative; > .collapsibleButton { -- 2.20.1