Skip to content

Commit c7039dd

Browse files
authored
feat(core): tailwind v4 support (NativeScript#10692)
1 parent 2305511 commit c7039dd

File tree

1 file changed

+8
-3
lines changed
  • packages/core/ui/core/properties

1 file changed

+8
-3
lines changed

packages/core/ui/core/properties/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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]+)?)dip\b/g, '$1'));
154+
let cssValue = value.replace(/([0-9]+(\.[0-9]+)?)dip\b/g, '$1');
155+
if (cssValue.includes('unset')) {
156+
// ensure unset is properly handled before processing calc
157+
cssValue = cssValue.replace(/unset/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) {

0 commit comments

Comments
 (0)