File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/core/ui/core/properties Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,12 @@ export function _evaluateCssCalcExpression(value: string) {
151151
152152 if ( isCssCalcExpression ( value ) ) {
153153 // WORKAROUND: reduce-css-calc can't handle the dip-unit.
154- return require ( 'reduce-css-calc' ) ( value . replace ( / ( [ 0 - 9 ] + ( \. [ 0 - 9 ] + ) ? ) d i p \b / g, '$1' ) ) ;
154+ let cssValue = value . replace ( / ( [ 0 - 9 ] + ( \. [ 0 - 9 ] + ) ? ) d i p \b / g, '$1' ) ;
155+ if ( cssValue . includes ( 'unset' ) ) {
156+ // ensure unset is properly handled before processing calc
157+ cssValue = cssValue . replace ( / u n s e t / g, '0' ) ;
158+ }
159+ return require ( 'reduce-css-calc' ) ( cssValue ) ;
155160 } else {
156161 return value ;
157162 }
@@ -920,10 +925,10 @@ export class CssAnimationProperty<T extends Style, U> implements CssAnimationPro
920925 get : getsComputed
921926 ? function ( this : T ) {
922927 return this [ computedValue ] ;
923- }
928+ }
924929 : function ( this : T ) {
925930 return this [ symbol ] ;
926- } ,
931+ } ,
927932 set ( this : T , boxedValue : U | string ) {
928933 const view = this . viewRef . get ( ) ;
929934 if ( ! view ) {
You can’t perform that action at this time.
0 commit comments