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

Fixed border-color is saved incorrectly, resulting in missing color in shortcut properties

Discussion in 'Resolved Bug Reports' started by Arty, Nov 18, 2014.

  1. Arty

    Arty Well-Known Member

    I have the following property in style:
      @property "primaryContent";
       background-color: @contentBackground;
       padding: 9px;
       border: 1px solid @primaryLightest;
       border-radius: 0;
       border-color: rgba(255, 255, 255, .8) rgba(192, 192, 192, .3) rgba(192, 192, 192, .3) rgba(255, 255, 255, .8);
       box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.2);
       @property "/primaryContent";
    When viewed in admin control panel, it shows border-color in extra block instead of assigning color values to border block.

    That wouldn't be a big issue, except that in other templates I use shortcut for that border:
    {xen:property primaryContent.border}
    Parser changes it to
      @property "primaryContent.border";
       border: 1px solid @primaryLightest;
       border-radius: 0;
       @property "/primaryContent.border";
    where border-color is missing.
  2. Hoffi

    Hoffi Well-Known Member

    And what happens, if you delete the border-part from the extra Block and changes the border, save it and reload the Settings?
  3. Arty

    Arty Well-Known Member

    Same error. Problem is in WebDav parser that fails to parse border color if it has values that aren't color keywords or hex color values.

    Found a workaround: assigning each value individually
      border-top-color: rgba(255, 255, 255, .8);
       border-right-color: rgba(192, 192, 192, .3);
       border-bottom-color: rgba(192, 192, 192, .3);
       border-left-color: rgba(255, 255, 255, .8);
  4. Mike

    Mike XenForo Developer Staff Member

    This is down to naive parsing of the color/style/width attributes. It's just split on spaces. You can workaround it by removing the spaces in each color.
    Arty likes this.
  5. Mike

    Mike XenForo Developer Staff Member

    This should be sorted for the next 1.4 release.
    Arty likes this.

Share This Page