diff --git a/deps/weex-styler/lib/validator.js b/deps/weex-styler/lib/validator.js index 4a61a99..f8c3b55 100644 --- a/deps/weex-styler/lib/validator.js +++ b/deps/weex-styler/lib/validator.js @@ -3232,6 +3232,14 @@ function cssVarFun(value) { function validate(name, value) { saveCssProp(name, value) var result, log + if (typeof value === 'string') { + if (value.match(/var/)) { + value = cssVarFun(value) + } + if (value.match(/calc/)) { + value = evalRpn(dal2Rpn(value)) + } + } var validator = validatorMap[name] if (typeof validator === 'function') { @@ -3242,19 +3250,6 @@ function validate(name, value) { /* istanbul ignore else */ else { result = {value: value} - if (name != "border") { - var value = result.value.toString() - if (value.match(/var/)) { - value = cssVarFun(value) - } - if (value.match(/calc/)) { - value = dal2Rpn(value) - value = evalRpn(value) - } else { - value = value - } - result = {value: value} - } } if (result.reason) { log = {reason: result.reason(name, value, result.value)}