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

Fixed Style properties: border-color error

Discussion in 'Resolved Bug Reports' started by Arty, Oct 11, 2012.

  1. Arty

    Arty Well-Known Member

    There is a bug in style properties parser. When I try to assign different colors to each border, it puts them all as value for "border" shortcut, creating complete mess.

    This is code I'm assigning inside property when editing template via WebDav:
        border: 1px solid @primaryMedium;
        border-color: @primaryMedium @secondaryMedium @secondaryMedium @primaryMedium;
    or this
        border-width: 1px;
        border-style: solid;
        border-color: @primaryMedium @secondaryMedium @secondaryMedium @primaryMedium;
    This is result in CSS output:
    border: 1px solid rgb(47, 110, 165) rgb(171, 55, 55) rgb(171, 55, 55) rgb(47, 110, 165);
    And this is what I see when I reload same template via WebDav:
        border: 1px solid @primaryMedium @secondaryMedium @secondaryMedium @primaryMedium;
    Jake Bunce and Adam Howard like this.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    The parser doesn't correctly handle multiple values for border-color, border-style, or border-width. Here is my own more overt test case. Enter this CSS:

    	border-width: thin medium thick 10px;
    	border-color: @primaryMedium @secondaryMedium @primaryMedium @secondaryMedium;
    	border-style: dotted solid double dashed;
    Upon save it writes out this property in shorthand which is invalid:

    	border: thin medium thick 10px dotted solid double dashed @primaryMedium @secondaryMedium @primaryMedium @secondaryMedium;
    The border shorthand only accepts individual values for each of the three border properties. It needs to break it up into border-top, border-right, etc.
    Shelley and Adam Howard like this.
  3. Mike

    Mike XenForo Developer Staff Member

    This is resolved now. Aside from border-width, -color and -style, this applied to border-radius as well.
    Slavik likes this.

Share This Page