Add missing transform for `transform: translateX` from ltr to rtl
authorMatthias Schmidt <gravatronics@live.com>
Thu, 15 Sep 2016 19:13:23 +0000 (21:13 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 15 Sep 2016 19:13:23 +0000 (21:13 +0200)
wcfsetup/install/files/lib/util/StyleUtil.class.php

index 660f8d638803f60d91633900ba02974361d107f9..8e561fe9a7a6cfcf51bb305e18dba30823cdddb0 100644 (file)
@@ -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<negate>-)?(?P<number>\d+)(?P<unit>[^\s\)]+)\)/', function($matches) {
+                       return 'transform: translateX(' . ($matches['negate'] ? '' : '-') . $matches['number'] . $matches['unit'] . ')';
+               }, $contents);
+               
                return $contents;
        }