feat: remove colour pallete flattening

This commit is contained in:
SethBurkart123
2025-03-12 20:57:33 +11:00
parent 5eb92bc87a
commit 1263c1c8ef
+1 -15
View File
@@ -1,5 +1,3 @@
import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette";
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
export default { export default {
content: [ content: [
@@ -42,17 +40,5 @@ export default {
}, },
plugins: [ plugins: [
require('@tailwindcss/forms'), require('@tailwindcss/forms'),
addVariablesForColors,
], ],
}; };
function addVariablesForColors({ addBase, theme }) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
":root": newVars,
});
}