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

XF 1.5 xen:calc intval question

Discussion in 'Styling and Customization Questions' started by Russ, Jul 26, 2016.

  1. Russ

    Russ Well-Known Member

    Just curious about the recent change, so the intval portion should be used if calling a specific thing from a css style property such as the padding, but there's no need if it's a single line style property?

    {xen:calc 'intval(@content.padding-left) / 2'}px;
    height: {xen:calc '@headerLogoHeight + @headerTabHeight * 2 + 2'}px; /* +2 borders *
  2. Mike

    Mike XenForo Developer Staff Member

    It was done for PHP 7.1 compatibility if someone emptied a property we used for calculations. The places we didn't change were elements we didn't think were ever reasonable to empty (mostly because they're scalars and important).
    Russ likes this.

Share This Page