From cce3cca7250f7d04819428df2b1ea081468d7cd2 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 15 Sep 2016 21:13:23 +0200 Subject: [PATCH] Add missing transform for `transform: translateX` from ltr to rtl --- wcfsetup/install/files/lib/util/StyleUtil.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/util/StyleUtil.class.php b/wcfsetup/install/files/lib/util/StyleUtil.class.php index 660f8d6388..8e561fe9a7 100644 --- a/wcfsetup/install/files/lib/util/StyleUtil.class.php +++ b/wcfsetup/install/files/lib/util/StyleUtil.class.php @@ -99,6 +99,11 @@ final class StyleUtil { $contents = str_replace('border-bottom-right-radius:', 'border-bottom-left-radius:', $contents); $contents = str_replace('wcf-border-bottom-left-radius:', 'border-bottom-right-radius:', $contents); + // transform: translateX + $contents = preg_replace_callback('/transform:\s*translateX\((?P-)?(?P\d+)(?P[^\s\)]+)\)/', function($matches) { + return 'transform: translateX(' . ($matches['negate'] ? '' : '-') . $matches['number'] . $matches['unit'] . ')'; + }, $contents); + return $contents; } -- 2.20.1