From 8b801cfd8a1f3e079386b767f4687fd9ef09723a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E6=A5=BD=E5=9D=82=E3=81=BF=E3=81=9A=E3=81=8D?= <45122329+cokemine@users.noreply.github.com> Date: Thu, 2 Sep 2021 09:45:15 +0800 Subject: [PATCH] fix(utils): make width valid with `calc` (#3181) fix #3032 --- packages/utils/validators.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/validators.ts b/packages/utils/validators.ts index 3f23f1dcfb..34a35f1449 100644 --- a/packages/utils/validators.ts +++ b/packages/utils/validators.ts @@ -6,7 +6,7 @@ export const isValidWidthUnit = (val: string | number): boolean =>{ } else { return ['px', 'rem', 'em', 'vw', '%', 'vmin', 'vmax'].some(unit => (val as string).endsWith(unit), - ) + ) || (val as string).startsWith('calc') } }