-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathtailwind.config.ts
119 lines (112 loc) · 3.43 KB
/
tailwind.config.ts
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import type { Config } from "tailwindcss"
const defaultTheme = require("tailwindcss/defaultTheme");
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,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
'text': 'var(--text)',
'background': 'var(--background)',
'primary': 'var(--primary)',
'secondary': 'var(--secondary)',
'accent': 'var(--accent)',
foreground: 'var(--foreground)',
card: 'var(--card)',
cardForeground: 'var(--card-foreground)',
popover: 'var(--popover)',
popoverForeground: 'var(--popover-foreground)',
primaryForeground: 'var(--primary-foreground)',
secondaryForeground: 'var(--secondary-foreground)',
muted: 'var(--muted)',
mutedForeground: 'var(--muted-foreground)',
accentForeground: 'var(--accent-foreground)',
destructive: 'var(--destructive)',
destructiveForeground: 'var(--destructive-foreground)',
border: 'var(--border)',
input: 'var(--input)',
ring: 'var(--ring)',
chart1: 'var(--chart-1)',
chart2: 'var(--chart-2)',
chart3: 'var(--chart-3)',
chart4: 'var(--chart-4)',
chart5: 'var(--chart-5)',
clickWhite: 'var(--clickWhite)',
inputGray: 'var(--inputGray)',
bgActive: 'var(--bgActive)',
},
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" },
},
shimmer: {
"0%, 90%, 100%": {
"background-position": "calc(-100% - var(--shimmer-width)) 0",
},
"30%, 60%": {
"background-position": "calc(100% + var(--shimmer-width)) 0",
},
},
grid: {
"0%": { transform: "translateY(-50%)" },
"100%": { transform: "translateY(0)" },
},
fadeIn: {
from: { opacity: "0" },
to: { opacity: "1" },
},
spotlight: {
"0%": {
opacity: "0",
transform: "translate(50%, -50%) scale(0.8)",
},
"100%": {
opacity: "1",
transform: "translate(0%, 0%) scale(1)",
},
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
shimmer: "shimmer 8s infinite",
grid: "grid 15s linear infinite",
fade: 'fadeIn .5s ease-in-out',
spotlight: "spotlight 1.2s ease .75s 1 forwards",
},
},
},
plugins: [require("tailwindcss-animate"), addVariablesForColors],
} satisfies 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,
});
}
export default config