diff --git a/deps/weex-styler/lib/validator.js b/deps/weex-styler/lib/validator.js index 0c7ad90a5a6fc3eee219b87863fb9434cc3894c1..e0438585700842de3f00274bd2f8fb2e7314dfe2 100644 --- a/deps/weex-styler/lib/validator.js +++ b/deps/weex-styler/lib/validator.js @@ -633,8 +633,14 @@ var SHORTHAND_VALIDATOR = function SHORTHAND_VALIDATOR(v, validateFunction, isAr } var BORDER_VALIDATOR = function BORDER_VALIDATOR (value, name) { - value = (value || '').toString().trim() - const values = value.split(/\s+/) + value = (value || '').toString().trim(); + let values = ''; + const colorAttribute = value.match(/\(.*?\)/g); + if (colorAttribute && colorAttribute.length === 1) { + values = value.replace(colorAttribute[0], colorAttribute[0].replace(/\s+/g, '')).split(/\s+/); + } else { + values = value.split(/\s+/); + } const res = [] let hasError = false const reasons = []