-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
181 lines (169 loc) Β· 5.17 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import type { Config } from "tailwindcss";
import ta from "tailwindcss-animate";
import tad from "tailwindcss-animated";
import trac from "tailwindcss-react-aria-components";
import { fontFamily } from "tailwindcss/defaultTheme";
import type { PluginCreator } from "tailwindcss/types/config";
const headingPlugin: PluginCreator = ({ addComponents, theme }) =>
addComponents({
".heading-1": {
scrollMargin: theme("margin.20"),
fontWeight: theme("fontWeight.extrabold"),
fontSize: theme("fontSize.4xl"),
letterSpacing: theme("letterSpacing.tight"),
"@screen lg": {
fontSize: theme("fontSize.5xl"),
lineHeight: "1",
},
},
".heading-2": {
scrollMargin: theme("margin.20"),
fontWeight: theme("fontWeight.semibold"),
fontSize: theme("fontSize.3xl"),
lineHeight: "2.25rem",
letterSpacing: theme("letterSpacing.tight"),
"&:first-child": {
marginTop: "0",
},
},
".heading-3": {
scrollMargin: theme("margin.20"),
fontWeight: theme("fontWeight.semibold"),
fontSize: theme("fontSize.2xl"),
lineHeight: "2rem",
letterSpacing: theme("letterSpacing.tight"),
},
".heading-4": {
scrollMargin: theme("margin.20"),
fontWeight: theme("fontWeight.semibold"),
fontSize: theme("fontSize.xl"),
lineHeight: "1.75rem",
letterSpacing: theme("letterSpacing.tight"),
},
});
const config = {
darkMode: "class",
content: ["./src/**/*.{md,mdx,ts,tsx}"],
theme: {
extend: {
screens: {
xs: "480px",
},
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
colors: {
border: "oklch(var(--border) / <alpha-value>)",
input: "oklch(var(--input) / <alpha-value>)",
ring: "oklch(var(--ring) / <alpha-value>)",
bg: "oklch(var(--bg) / <alpha-value>)",
fg: "oklch(var(--fg) / <alpha-value>)",
primary: {
DEFAULT: "oklch(var(--primary) / <alpha-value>)",
fg: "oklch(var(--primary-fg) / <alpha-value>)",
},
secondary: {
DEFAULT: "oklch(var(--secondary) / <alpha-value>)",
fg: "oklch(var(--secondary-fg) / <alpha-value>)",
},
success: {
DEFAULT: "oklch(var(--success) / <alpha-value>)",
fg: "oklch(var(--success-fg) / <alpha-value>)",
},
warning: {
DEFAULT: "oklch(var(--warning) / <alpha-value>)",
fg: "oklch(var(--warning-fg) / <alpha-value>)",
},
danger: {
DEFAULT: "oklch(var(--danger) / <alpha-value>)",
fg: "oklch(var(--danger-fg) / <alpha-value>)",
},
muted: {
DEFAULT: "oklch(var(--muted) / <alpha-value>)",
fg: "oklch(var(--muted-fg) / <alpha-value>)",
},
accent: {
DEFAULT: "oklch(var(--accent) / <alpha-value>)",
fg: "oklch(var(--accent-fg) / <alpha-value>)",
},
popover: {
DEFAULT: "oklch(var(--popover) / <alpha-value>)",
fg: "oklch(var(--popover-fg) / <alpha-value>)",
},
card: {
DEFAULT: "oklch(var(--card) / <alpha-value>)",
fg: "oklch(var(--card-fg) / <alpha-value>)",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
fontFamily: {
sans: ["var(--font-sans)", ...fontFamily.sans],
mono: ["var(--font-mono)", ...fontFamily.mono],
},
keyframes: {
// Animated Spotlight
spotlight: {
"0%": {
opacity: "0",
transform: "translate(-72%, -62%) scale(0.5)",
},
"100%": {
opacity: "1",
transform: "translate(-50%,-40%) scale(1)",
},
},
// Animated Badge
flip: {
to: {
transform: "rotate(360deg)",
},
},
rotate: {
to: {
transform: "rotate(90deg)",
},
},
// Radix Collapsible
"collapsible-up": {
from: {
height: "var(--radix-collapsible-content-height)",
},
to: { height: "0", opacity: "0" },
},
"collapsible-down": {
from: { height: "0", opacity: "0" },
to: {
height: "var(--radix-collapsible-content-height)",
},
},
// Marquee
marquee: {
from: { transform: "translateX(0)" },
to: { transform: "translateX(calc(-100% - var(--gap, 1rem)))" },
},
},
animation: {
// Animated Spotlight
spotlight: "spotlight 2s ease .75s 1 forwards",
// Animated Badge
flip: "flip 6s infinite steps(2, end)",
rotate: "rotate 3s linear infinite both",
// Radix Collapsible
"collapsible-up": "collapsible-up 150ms ease-out",
"collapsible-down": "collapsible-down 150ms ease-out",
// Marquee
marquee: "marquee var(--duration, 20s) linear infinite",
},
},
},
plugins: [ta, tad, trac, headingPlugin],
} satisfies Config;
export default config;