Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/core/ui/core/properties/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ export function _evaluateCssCalcExpression(value: string) {
}

if (isCssCalcExpression(value)) {
// WORKAROUND: reduce-css-calc can't handle the dip-unit.
// Note: reduce-css-calc can't handle certain values
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');
}
if (cssValue.includes('infinity')) {
cssValue = cssValue.replace(/infinity/g, '999999');
}
return require('reduce-css-calc')(cssValue);
} else {
return value;
Expand Down