diff --git a/packages/uniwind/src/bundler/css-processor/functions.ts b/packages/uniwind/src/bundler/css-processor/functions.ts index 86d0b584..c82133e5 100644 --- a/packages/uniwind/src/bundler/css-processor/functions.ts +++ b/packages/uniwind/src/bundler/css-processor/functions.ts @@ -205,8 +205,9 @@ export class Functions { const amount = argument?.type === 'token' && argument.value.type === 'percentage' ? roundToPrecision(argument.value.value, 2) : this.Processor.CSS.processValue(fn.arguments) + const expression = typeof amount === 'string' && amount.startsWith('"') ? amount : `(${amount})` - return `rt.filterFn("${fn.name}", ${amount}, "${FILTER_UNITS[fn.name] ?? ''}")` + return `"${fn.name}(" + ${expression} + "${FILTER_UNITS[fn.name] ?? ''})"` } private processColorMix(fn: FunctionType) { diff --git a/packages/uniwind/src/core/native/runtime.ts b/packages/uniwind/src/core/native/runtime.ts index d1b49a39..9ab99de7 100644 --- a/packages/uniwind/src/core/native/runtime.ts +++ b/packages/uniwind/src/core/native/runtime.ts @@ -24,7 +24,6 @@ export const UniwindRuntime = { right: 0, }, colorMix, - filterFn: (name: string, amount: number | string, unit: string) => `${name}(${amount}${unit})`, pixelRatio: value => value * PixelRatio.get(), cubicBezier: () => '', lightDark: () => '',