1. 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

Discussion in 'Resolved Bug Reports' started by Arty, Aug 6, 2013.

  1. Arty

    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;
     
  2. Arty

    Arty Well-Known Member

    @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: Aug 6, 2013
  3. Kier

    Kier XenForo Developer Staff Member

    Investigating...
     
  4. Kier

    Kier XenForo Developer Staff Member

    Fixed now.

    Screen Shot 2013-08-06 at 12.35.03.png
     
    Arty, CyberAP and Moshe1010 like this.
  5. Arty

    Arty Well-Known Member

    That fix won't work if number starts with dot: box-shadow: .5em ....etc
     
  6. Mike

    Mike XenForo Developer Staff Member

    The actual fix is a bit different, but fair point.
     
    Arty likes this.

Share This Page