• 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

Arty

Well-known member
#1
I have the following property in style:
Code:
  @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:
Code:
{xen:property primaryContent.border}
Parser changes it to
Code:
  @property "primaryContent.border";
   border: 1px solid @primaryLightest;
   border-radius: 0;
   @property "/primaryContent.border";
where border-color is missing.
 

Hoffi

Well-known member
#2
And what happens, if you delete the border-part from the extra Block and changes the border, save it and reload the Settings?
 

Arty

Well-known member
#3
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
Code:
  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);
 

Mike

XenForo developer
Staff member
#4
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.