-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
103 lines (100 loc) · 2.97 KB
/
tailwind.config.ts
File metadata and controls
103 lines (100 loc) · 2.97 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import type { Config } from "tailwindcss";
import animatePlugin from "tailwindcss-animate";
// Helper function to convert hex to RGB for CSS variables
// const hexToRgb = (hex: string): string => {
// hex = hex.replace("#", "");
// const bigint = parseInt(hex, 16);
// const r = (bigint >> 16) & 255;
// const g = (bigint >> 8) & 255;
// const b = bigint & 255;
// return `${r} ${g} ${b}`;
// };
const config = {
darkMode: "class",
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
prefix: "",
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "oklch(var(--border))", // Use OKLCH vars
input: "oklch(var(--input))",
ring: "oklch(var(--ring))",
background: "oklch(var(--background))",
foreground: "oklch(var(--foreground))",
primary: {
DEFAULT: "oklch(var(--primary))",
foreground: "oklch(var(--primary-foreground))",
},
secondary: {
DEFAULT: "oklch(var(--secondary))",
foreground: "oklch(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "oklch(var(--destructive))",
// foreground: "oklch(var(--destructive-foreground))", // Add if you define this var
},
muted: {
DEFAULT: "oklch(var(--muted))",
foreground: "oklch(var(--muted-foreground))",
},
accent: {
DEFAULT: "oklch(var(--accent))",
foreground: "oklch(var(--accent-foreground))",
},
popover: {
DEFAULT: "oklch(var(--popover))",
foreground: "oklch(var(--popover-foreground))",
},
card: {
DEFAULT: "oklch(var(--card))",
foreground: "oklch(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
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" },
},
'fade-in-out': {
'0%': { opacity: '0' },
'10%': { opacity: '1' },
'90%': { opacity: '1' },
'100%': { opacity: '0' },
},
shimmer: {
'0%': { transform: 'translateX(-100%)' },
'100%': { transform: 'translateX(100%)' }
}
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
'fade-in-out': 'fade-in-out 5s ease-in-out infinite',
shimmer: 'shimmer 2s infinite linear',
},
},
},
plugins: [animatePlugin],
} satisfies Config;
export default config;