fix(utils): make width valid with calc (#3181)

fix #3032
This commit is contained in:
神楽坂みずき 2021-09-02 09:45:15 +08:00 committed by GitHub
parent e8a66adffd
commit 8b801cfd8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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')
}
}