diff --git a/packages/core/ui/core/properties/index.ts b/packages/core/ui/core/properties/index.ts index 1eedb390ef..3ca9be748a 100644 --- a/packages/core/ui/core/properties/index.ts +++ b/packages/core/ui/core/properties/index.ts @@ -151,7 +151,12 @@ export function _evaluateCssCalcExpression(value: string) { if (isCssCalcExpression(value)) { // WORKAROUND: reduce-css-calc can't handle the dip-unit. - return require('reduce-css-calc')(value.replace(/([0-9]+(\.[0-9]+)?)dip\b/g, '$1')); + let cssValue = value.replace(/([0-9]+(\.[0-9]+)?)dip\b/g, '$1'); + if (cssValue.includes('unset')) { + // ensure unset is properly handled before processing calc + cssValue = cssValue.replace(/unset/g, '0'); + } + return require('reduce-css-calc')(cssValue); } else { return value; } @@ -920,10 +925,10 @@ export class CssAnimationProperty implements CssAnimationPro get: getsComputed ? function (this: T) { return this[computedValue]; - } + } : function (this: T) { return this[symbol]; - }, + }, set(this: T, boxedValue: U | string) { const view = this.viewRef.get(); if (!view) {