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

As Designed font-family: inherit; does not get saved via WebDav

Discussion in 'Resolved Bug Reports' started by Arty, Aug 31, 2014.

  1. Arty

    Arty Well-Known Member

    When trying to save this style property via WebDav:
    Code:
        @property "navTabLink";
         display: block;
         font-family: inherit;
         @property "/navTabLink";
    
    it saves only display:block; but not font-family. font-family line just disappears like it was never there.

    HTML output:
    Code:
    .navTabs .navTab.selected .tabLinks a
    {
    display: block;
    
    }
    
    It happens only when saving style property via WebDav. When entering "inherit" in font family field in admin control panel's style property editor it works fine.

    Tested with 1.4.0 RC 1
     
    RoldanLT likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    This isn't something I'm going to change right now as there are a lot of cases where inherit doesn't work (any sort of shortcut property, for example). If you put inherit in and end up triggering a shortcut, it will fall over. As such, they're not expected in style properties -- we explicitly disable it:
    Code:
                        else if ($value == 'inherit')
                        {
                            $isValidRule = false; // can't put inherit rules in properties
                            $nonPropertyRules[] = $ruleMatch[0];
                        }
    
    I should note that it actually gets moved out of the rule automatically, at least via the ACP itself:
    Code:
    .x
    {
    @property "navTabLink";
    display: block;
    @property "/navTabLink";
    font-family: inherit;
    }
    I'm not sure if something is interfering with that via WebDAV (possibly client specific).
     
  3. Arty

    Arty Well-Known Member

    That is not correct. Inherit does work in all shortcut properties.
     
  4. Mike

    Mike XenForo Developer Staff Member

    I was referring to the context of style properties. We create the shortcuts dynamically and do not account for inherit, which would require the properties to be done in long hand.
     

Share This Page