From 2f934537a22c47307e355c0bcda28d3b96300df8 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Thu, 12 Dec 2024 23:29:13 +0100 Subject: [PATCH] Env: Update tailwindcss safelist --- postcss.config.js | 4 ++-- prettier.config.js | 2 +- tailwind.config.ts | 17 +++++++++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index 2e7af2b..93e5b53 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { plugins: { - tailwindcss: {}, + tailwindcss: { config: "./tailwind.config.ts" }, autoprefixer: {}, }, -} +}; diff --git a/prettier.config.js b/prettier.config.js index 1d3215f..a445d27 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -17,7 +17,7 @@ const config = { quoteProps: "as-needed", trailingComma: "all", bracketSpacing: true, - bracketSameLine: true, + bracketSameLine: false, arrowParens: "always", // File specific configuration options diff --git a/tailwind.config.ts b/tailwind.config.ts index 8623048..c460e2c 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -7,10 +7,7 @@ import forms from "@tailwindcss/forms"; const config = { content: [ "./src/**/*.{html,js,svelte,ts}", - join( - require.resolve("@skeletonlabs/skeleton"), - "../**/*.{html,js,svelte,ts}", - ), + join(require.resolve("@skeletonlabs/skeleton"), "../**/*.{html,js,svelte,ts}"), ], theme: { extend: {}, @@ -23,6 +20,18 @@ const config = { }, }), ], + safelist: [ + // List all patterns that are used dynamically, e.g. class="variant-filled-{color}" + { + pattern: /variant-filled-+/, + }, + { + pattern: /w-full/, + }, + { + pattern: /w-auto/, + }, + ], } satisfies Config; export default config;