build: replace "purge" property with "safelist" property in Tailwind CSS configuration

This commit is contained in:
Dorian Niemiec 2024-11-05 19:25:00 +01:00
parent 4988419b36
commit 919c35354d

View file

@ -4,13 +4,9 @@ module.exports = {
content: [ content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}", "./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}", "./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}", "./app/**/*.{js,ts,jsx,tsx,mdx}"
], ],
purge: {
options: {
safelist: ["dark"], safelist: ["dark"],
},
},
theme: { theme: {
extend: { extend: {
colors: { colors: {
@ -21,53 +17,53 @@ module.exports = {
foreground: "hsla(var(--foreground), 1)", foreground: "hsla(var(--foreground), 1)",
primary: { primary: {
DEFAULT: "hsla(var(--primary), 1)", DEFAULT: "hsla(var(--primary), 1)",
foreground: "hsla(var(--primary-foreground), 1)", foreground: "hsla(var(--primary-foreground), 1)"
}, },
secondary: { secondary: {
DEFAULT: "hsla(var(--secondary), 1)", DEFAULT: "hsla(var(--secondary), 1)",
foreground: "hsla(var(--secondary-foreground), 1)", foreground: "hsla(var(--secondary-foreground), 1)"
}, },
destructive: { destructive: {
DEFAULT: "hsla(var(--destructive), 1)", DEFAULT: "hsla(var(--destructive), 1)",
foreground: "hsla(var(--destructive-foreground), 1)", foreground: "hsla(var(--destructive-foreground), 1)"
}, },
muted: { muted: {
DEFAULT: "hsla(var(--muted), 1)", DEFAULT: "hsla(var(--muted), 1)",
foreground: "hsla(var(--muted-foreground), 1)", foreground: "hsla(var(--muted-foreground), 1)"
}, },
accent: { accent: {
DEFAULT: "hsla(var(--accent), 1)", DEFAULT: "hsla(var(--accent), 1)",
foreground: "hsla(var(--accent-foreground), 1)", foreground: "hsla(var(--accent-foreground), 1)"
}, },
popover: { popover: {
DEFAULT: "hsla(var(--popover), 1)", DEFAULT: "hsla(var(--popover), 1)",
foreground: "hsla(var(--popover-foreground), 1)", foreground: "hsla(var(--popover-foreground), 1)"
}, },
card: { card: {
DEFAULT: "hsla(var(--card), 1)", DEFAULT: "hsla(var(--card), 1)",
foreground: "hsla(var(--card-foreground), 1)", foreground: "hsla(var(--card-foreground), 1)"
}, }
}, },
borderRadius: { borderRadius: {
lg: `var(--radius)`, lg: `var(--radius)`,
md: `calc(var(--radius) - 2px)`, md: `calc(var(--radius) - 2px)`,
sm: "calc(var(--radius) - 4px)", sm: "calc(var(--radius) - 4px)"
}, },
keyframes: { keyframes: {
"accordion-down": { "accordion-down": {
from: { height: 0 }, from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" }, to: { height: "var(--radix-accordion-content-height)" }
}, },
"accordion-up": { "accordion-up": {
from: { height: "var(--radix-accordion-content-height)" }, from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 }, to: { height: 0 }
}, }
}, },
animation: { animation: {
"accordion-down": "accordion-down 0.2s ease-out", "accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out", "accordion-up": "accordion-up 0.2s ease-out"
}
}
}, },
}, plugins: []
},
plugins: [],
}; };