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

Won't Fix Style properties shortcuts and IE8

Discussion in 'Resolved Bug Reports' started by Arty, Feb 12, 2015.

  1. Arty

    Arty Well-Known Member

    I'm trying to assign rgba border for modern browsers and transparent border for IE8 that cannot handle rgba colors. So in style property I write this:
        border-right: 1px solid transparent;
         border-right-color: rgba(0, 0, 0, .1);
    But XenForo combines that to border-right shortcut and then some shenanigans happen. This is XenForo output:
    border-right: 1px solid rgb(0, 0, 0); border-right: 1px solid rgba(0, 0, 0, .1); _border-right: 1px solid rgb(0, 0, 0);
    edit: another related issue. When trying workaround by using IE8-only hack:
        border-right: 1px solid rgba(0, 0, 0, .1);
         border-right-color/*\**/: transparent\9;
    XenForo outputs this:
    border-right: 1px solid transparent\9;
    Last edited: Feb 12, 2015
  2. Mike

    Mike XenForo Developer Staff Member

    Style properties are not designed to do what you're trying to do. They're a step above CSS and the CSS is really just an approximate representation and the translation from CSS to style property is not going to be perfect when you start doing advanced stuff. If you want to do complex things, you should be doing it directly in the CSS (outside a style property extension).

Share This Page