From ab8a94b7e41432bea7e34d90f988e15e71bab51a Mon Sep 17 00:00:00 2001 From: Vytenis Date: Wed, 22 Jan 2025 21:04:08 +0200 Subject: [PATCH 1/2] Turn off if preflight is off I do understand that this plugin is meant to be used only in thus cases where reset is needed. But I do believe that plugin should respect the core settings of the tailwind. https://tailwindcss.com/docs/preflight#disabling-preflight This PR is not tested --- src/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b86a224..3b06fbc 100644 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,7 @@ function resolveColor(color, opacityVariableName) { } const forms = plugin.withOptions(function (options = { strategy: undefined }) { - return function ({ addBase, addComponents, theme }) { + return function ({ addBase, addComponents, theme, config }) { function resolveChevronColor(color, fallback) { let resolved = theme(color) @@ -355,6 +355,10 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) { }) .filter(Boolean) + if (config?..corePlugins?.preflight === false) { + return + } + if (strategy.includes('base')) { addBase(getStrategyRules('base')) } From 4ee1052b4de7ead8ccc91416a7cd1400593a9c80 Mon Sep 17 00:00:00 2001 From: Vytenis Date: Tue, 28 Jan 2025 19:41:09 +0200 Subject: [PATCH 2/2] ups --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 3b06fbc..992c620 100644 --- a/src/index.js +++ b/src/index.js @@ -355,7 +355,7 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) { }) .filter(Boolean) - if (config?..corePlugins?.preflight === false) { + if (config?.corePlugins?.preflight === false) { return }