function transformValue(node, property) {
      var value = node[property]

      if (!value || !CONTAINS_CALC.test(value)) {
        return
      }

      helpers.try(function transformCSSCalc() {
        var reducedValue = reduceCSSCalc(value, precision)

        if (warnWhenCannotResolve && CONTAINS_CALC.test(reducedValue)) {
          result.warn("Could not reduce expression: " + value,
            {plugin: "postcss-calc", node: node})
        }

        if (!preserve) {
          node[property] = reducedValue
          return
        }

        if (reducedValue != value) {
          var clone = node.clone()
          clone[property] = reducedValue
          node.parent.insertBefore(node, clone)
        }
      }, node.source)
    }
PostCSS plugin to reduce calc() function calls.