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

Lack of Interest Get rid of outdated prefixes (or use an autoprefixer)

Discussion in 'Closed Suggestions' started by CyberAP, Sep 27, 2015.

  1. CyberAP

    CyberAP Well-Known Member

    Right now XenForo adds many prefixes that are not required by modern browsers. Including prefixes for:
    • border-radius
    • box-shadow
    • box-sizing
    According to caniuse.com statistics we don't need any of these prefixes anymore. I suggest removing them, making css file lighter.

    Otherwise, there is an excellent alternative called Autoprefixer. Yes, it's written in coffeescript and it's a plugin for PostCSS (which is in JS), but there's a PHP version of that plugin, which may improve prefixing process a lot. You can even set your browser support table!
     
    RoldanLT likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    We still support IE8, so in most cases they are still required.
     
  3. CyberAP

    CyberAP Well-Known Member

    I think -khtml, -moz and -webkit prefixes are not required by IE :)
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Indeed that is true.

    But my point was mostly that we support IE8 so really we make a best effort to support other browsers up to the same age, though admittedly these are less of a specific target seeing as these are generally more likely to be kept up to date.

    It's a fair suggestion, by the way, just wanted to point that out.
     
  5. CyberAP

    CyberAP Well-Known Member

    I get your point, but I suppose IE8 is supported because it's usage is still more than 1%. In case of other browsers that require prefixes their usage is far less than 1%, and in some cases even less than one tenth of a percent. In most cases it's Firefox 3.6, Chrome <10 and Safari <5.1. These browsers even combined don't have 1% of usage so removing prefixes for them won't cause any problems for 99% users. Others would have to upgrade of course.
     
  6. James

    James Well-Known Member

    I think it would make sense to drop the prefixes at the same time for browsers of the same age. The size difference we are talking about is negligible.
     

Share This Page