Fixed RTL languages messing up CSS rules

Arty

Well-known member
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;
 
@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:
Back
Top Bottom