-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
50 lines (46 loc) · 1.62 KB
/
Copy pathtailwind.config.ts
File metadata and controls
50 lines (46 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import type { Config } from "tailwindcss";
const colors = require("tailwindcss/colors");
const { default: flattenColorPalette } = require("tailwindcss/lib/util/flattenColorPalette");
const config = {
darkMode: ["class"],
content: ["./pages/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}", "./app/**/*.{ts,tsx}", "./src/**/*.{ts,tsx}"],
prefix: "",
theme: {
container: {
center: true,
},
extend: {
colors: {
brand: "#6366f1", // Indigo 500 - modern, trustworthy
brandDark: "#4f46e5", // Indigo 600 - darker accent
brandLight: "#818cf8", // Indigo 400 - lighter accent
accent: "#8b5cf6", // Violet 500 - complementary
dark: "#0f172a", // Slate 900 - deep dark
darkLight: "#1e293b", // Slate 800 - lighter dark
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography"), addVariablesForColors],
} satisfies Config;
export default config;
function addVariablesForColors({ addBase, theme }: any) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(Object.entries(allColors).map(([key, val]) => [`--${key}`, val]));
addBase({
":root": newVars,
});
}