From ae664d0f1eb81dbca5378e39aea6a742633ade38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20de=20Dios=20Mart=C3=ADnez=20Vallejo?= Date: Sun, 8 Mar 2026 23:54:00 +0100 Subject: [PATCH] feat: flatten @supports rules instead of removing them --- src/removeUnsupported.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/removeUnsupported.js b/src/removeUnsupported.js index 6d71326..b08f3d9 100644 --- a/src/removeUnsupported.js +++ b/src/removeUnsupported.js @@ -46,10 +46,14 @@ module.exports = (options = { debug: false }) => { mediaAtRule.remove(); }, - // remove @supports rules - not supported in NativeScript - // Tailwind v4 generates these for browser compatibility + // Flatten @supports rules instead of removing them. + // NativeScript Core 8.9.1+ supports color-mix() (see NativeScript/NativeScript#10718), + // and Tailwind v4 wraps opacity modifier utilities in @supports(color: color-mix(...)). supports(supportsAtRule) { - supportsAtRule.remove(); + if (!supportsAtRule.nodes || !supportsAtRule.nodes.length) { + return supportsAtRule.remove(); + } + supportsAtRule.replaceWith(...supportsAtRule.nodes); }, // remove @property rules