返回 presentation-ai
tailwind.config.ts
根目录 / tailwind.config.ts
1 /* eslint-disable @typescript-eslint/no-require-imports */
2 /* eslint-disable @typescript-eslint/unbound-method */
3 import { type Config } from "tailwindcss";
4 import typography from "@tailwindcss/typography";
5 import defaultTheme from "tailwindcss/defaultTheme.js";
6 import tailwindcssAnimate from "tailwindcss-animate";
7 import tailwindScrollbar from "tailwind-scrollbar";
8 import tailwindScrollbarHide from "tailwind-scrollbar-hide";
9
10 const { fontFamily } = defaultTheme;
11
12 const config = {
13 darkMode: "class",
14 content: [
15 "./pages/**/*.{ts,tsx}",
16 "./components/**/*.{ts,tsx}",
17 "./app/**/*.{ts,tsx}",
18 "./src/**/*.{ts,tsx}",
19 ],
20 prefix: "",
21 theme: {
22 container: {
23 center: true,
24 padding: "2rem",
25 screens: {
26 "2xl": "1400px",
27 },
28 },
29 extend: {
30 backgroundImage: {
31 "grid-pattern":
32 "linear-gradient(to right, rgba(55, 65, 81, 0.1) 1px, transparent 1px), linear-gradient(to bottom, rgba(55, 65, 81, 0.1) 1px, transparent 1px)",
33 },
34 backgroundSize: {
35 "grid-pattern": "20px 20px",
36 },
37 colors: {
38 border: "hsl(var(--border))",
39 input: "hsl(var(--input))",
40 ring: "hsl(var(--ring))",
41 background: "hsl(var(--background))",
42 foreground: "hsl(var(--foreground))",
43 primary: {
44 DEFAULT: "hsl(var(--primary))",
45 foreground: "hsl(var(--primary-foreground))",
46 },
47 secondary: {
48 DEFAULT: "hsl(var(--secondary))",
49 foreground: "hsl(var(--secondary-foreground))",
50 },
51 destructive: {
52 DEFAULT: "hsl(var(--destructive))",
53 foreground: "hsl(var(--destructive-foreground))",
54 },
55 muted: {
56 DEFAULT: "hsl(var(--muted))",
57 foreground: "hsl(var(--muted-foreground))",
58 },
59 dbi: {
60 DEFAULT: "hsl(var(--dbi))",
61 background: "hsl(var(--dbi-background))",
62 },
63 accent: {
64 DEFAULT: "hsl(var(--accent))",
65 foreground: "hsl(var(--accent-foreground))",
66 },
67 popover: {
68 DEFAULT: "hsl(var(--popover))",
69 foreground: "hsl(var(--popover-foreground))",
70 },
71 card: {
72 DEFAULT: "hsl(var(--card))",
73 foreground: "hsl(var(--card-foreground))",
74 },
75 chart: {
76 "1": "hsl(var(--chart-1))",
77 "2": "hsl(var(--chart-2))",
78 "3": "hsl(var(--chart-3))",
79 "4": "hsl(var(--chart-4))",
80 "5": "hsl(var(--chart-5))",
81 },
82 brand: {
83 DEFAULT: "hsl(var(--brand))",
84 foreground: "hsl(var(--brand-foreground))",
85 },
86 highlight: {
87 DEFAULT: "hsl(var(--highlight))",
88 foreground: "hsl(var(--highlight-foreground))",
89 },
90 },
91 borderRadius: {
92 lg: "var(--radius)",
93 md: "calc(var(--radius) - 2px)",
94 sm: "calc(var(--radius) - 4px)",
95 },
96 fontFamily: {
97 sans: ["var(--font-sans)", ...fontFamily.sans],
98 },
99 keyframes: {
100 "accordion-down": {
101 from: {
102 height: "0",
103 },
104 to: {
105 height: "var(--radix-accordion-content-height)",
106 },
107 },
108 shake: {
109 "0%, 100%": {
110 transform: "rotate(0deg)",
111 },
112 "25%": {
113 transform: "rotate(2deg)",
114 },
115 "50%": {
116 transform: "rotate(0deg)",
117 },
118 "75%": {
119 transform: "rotate(-2deg)",
120 },
121 },
122 "accordion-up": {
123 from: {
124 height: "var(--radix-accordion-content-height)",
125 },
126 to: {
127 height: "0",
128 },
129 },
130 breathing: {
131 "0%, 100%": {
132 transform: "scale(1)",
133 opacity: "1",
134 },
135 "50%": {
136 transform: "scale(1.05)",
137 opacity: "0.8",
138 },
139 },
140 },
141 animation: {
142 "accordion-down": "accordion-down 0.2s ease-out",
143 "accordion-up": "accordion-up 0.2s ease-out",
144 breathing: "breathing 4s ease-in-out infinite",
145 shake: "shake 0.3s ease-out",
146 },
147 },
148 },
149 plugins: [
150 tailwindcssAnimate,
151 tailwindScrollbar,
152 typography,
153 tailwindScrollbarHide,
154 ],
155 } satisfies Config;
156
157 export default config;
158
158 lines TYPESCRIPT