• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed RTL languages messing up CSS rules

Arty

Well-known member
#1
There is a problem with using some CSS rules with RTL language.

For example, adding this to style property
Code:
box-shadow: none !important;
works correctly with English language, but when viewing same page with Arabic language (no template changes, no add-ons) CSS output shows this
Code:
box-shadow: -none !important;
 

Arty

Well-known member
#2
@saad717 temporary fix for issue:

Open library/XenForo/Template/Helper/RightToLeft.php, find
Code:
  public static function handleBoxShadow(array $regexMatch)
   {
and add after it
Code:
    if (preg_match('/^(\-?[a-z]+)/', $regexMatch[2]))
     {
       $value = $regexMatch[2];
     }
     else
 
Last edited: