From: Matthias Schmidt Date: Thu, 15 Sep 2016 19:13:23 +0000 (+0200) Subject: Add missing transform for `transform: translateX` from ltr to rtl X-Git-Tag: 3.0.0_Beta_1~137 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cce3cca7250f7d04819428df2b1ea081468d7cd2;p=GitHub%2FWoltLab%2FWCF.git Add missing transform for `transform: translateX` from ltr to rtl --- 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; }