mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
feat(core): tailwind v4 support (#10692)
This commit is contained in:
@ -151,7 +151,12 @@ export function _evaluateCssCalcExpression(value: string) {
|
|||||||
|
|
||||||
if (isCssCalcExpression(value)) {
|
if (isCssCalcExpression(value)) {
|
||||||
// WORKAROUND: reduce-css-calc can't handle the dip-unit.
|
// 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 {
|
} else {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@ -920,10 +925,10 @@ export class CssAnimationProperty<T extends Style, U> implements CssAnimationPro
|
|||||||
get: getsComputed
|
get: getsComputed
|
||||||
? function (this: T) {
|
? function (this: T) {
|
||||||
return this[computedValue];
|
return this[computedValue];
|
||||||
}
|
}
|
||||||
: function (this: T) {
|
: function (this: T) {
|
||||||
return this[symbol];
|
return this[symbol];
|
||||||
},
|
},
|
||||||
set(this: T, boxedValue: U | string) {
|
set(this: T, boxedValue: U | string) {
|
||||||
const view = this.viewRef.get();
|
const view = this.viewRef.get();
|
||||||
if (!view) {
|
if (!view) {
|
||||||
|
Reference in New Issue
Block a user