-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.mjs
More file actions
412 lines (384 loc) · 13.3 KB
/
Copy pathtailwind.config.mjs
File metadata and controls
412 lines (384 loc) · 13.3 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
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
],
darkMode: "class",
theme: {
extend: {
colors: {
// Light mode
bg: "var(--bg)",
"bg-2": "var(--bg2)",
"bg-3": "var(--bg3)",
border: "var(--border)",
"border-2": "var(--border2)",
text: "var(--text)",
"text-2": "var(--text2)",
"text-3": "var(--text3)",
accent: "var(--accent)",
"accent-2": "var(--accent2)",
blue: "var(--blue)",
"blue-2": "var(--blue2)",
"blue-glow": "var(--blue-glow)",
success: "var(--success)",
error: "var(--error)",
warning: "var(--warning)",
// Mascot chicken
"chk-body": "var(--chk-body)",
"chk-shadow": "var(--chk-shadow)",
"chk-comb": "var(--chk-comb)",
"chk-beak": "var(--chk-beak)",
"chk-legs": "var(--chk-legs)",
"chk-eyes": "var(--chk-eyes)",
"chk-border": "var(--chk-border)",
// Chip
"chip-bg": "var(--chipbg)",
"chip-border": "var(--chipborder)",
"chip-sel": "var(--chipsel)",
"chip-border-sel": "var(--chipbordersel)",
"chip-sel-text": "var(--chipseltext)",
// Dot
dot: "var(--dot)",
"dot-done": "var(--dotdone)",
// Side panel
"side-bg": "var(--sidebg)",
// Overlay
"overlay-bg": "var(--overlay-bg)",
// Tints
"blue-tint": "var(--blue-tint)",
"blue-tint-2": "var(--blue-tint2)",
"yellow-tint": "var(--yellow-tint)",
"yellow-tint-2": "var(--yellow-tint2)",
"brand-yellow": "var(--brand-yellow)",
// Atmosphere
"math-float": "var(--mathfloat)",
},
fontFamily: {
grotesk: ["Space Grotesk", "Nunito", "sans-serif"],
mono: ["Space Mono", "monospace"],
},
fontSize: {
xs: ["11px", { lineHeight: "1" }],
sm: ["13px", { lineHeight: "1" }],
base: ["15px", { lineHeight: "1.5" }],
lg: ["16px", { lineHeight: "1.5" }],
},
letterSpacing: {
tighter: "-0.02em",
tight: "0.02em",
normal: "0",
mono: "0.13em",
"mono-sm": "0.04em",
},
borderRadius: {
xs: "8px",
sm: "10px",
md: "14px",
lg: "20px",
full: "50%",
},
boxShadow: {
sm: "0 4px 24px rgba(0, 0, 0, 0.07)",
md: "var(--shadow)",
"dark-lg": "0 4px 32px rgba(0, 0, 0, 0.4)",
"btn-cta": "0 5px 0 var(--blue2), 0 6px 16px var(--blue-glow)",
"btn-cta-hover": "0 7px 0 #1e3a8a, 0 10px 22px var(--blue-glow)",
"btn-cta-active": "0 2px 0 var(--blue2), 0 2px 8px var(--blue-glow)",
"btn-ghost": "0 4px 0 var(--border2)",
"btn-ghost-hover": "0 6px 0 var(--border2)",
"btn-ghost-active": "0 1px 0 var(--border2)",
},
keyframes: {
stepIn: {
from: { opacity: "0", transform: "translateY(14px)" },
to: { opacity: "1", transform: "translateY(0)" },
},
// Chicken animations
"chk-bob": {
"0%, 100%": { transform: "translateY(0px)" },
"50%": { transform: "translateY(-5px)" },
},
"chk-happy-bob": {
"0%, 100%": { transform: "translateY(0px)" },
"50%": { transform: "translateY(-10px)" },
},
"chk-thinking-bob": {
"0%, 100%": { transform: "translateY(0px)" },
"50%": { transform: "translateY(2px)" },
},
"chk-blink": {
"0%, 18%": { transform: "scaleY(1)" },
"20%": { transform: "scaleY(0.06)" },
"22%": { transform: "scaleY(1)" },
"24%": { transform: "scaleY(0.06)" },
"26%, 100%": { transform: "scaleY(1)" },
},
"chk-thinking-eyes": {
"0%, 100%": { transform: "scaleY(1)" },
"50%": { transform: "scaleY(0.1)" },
},
"chk-wave": {
"0%": { transform: "rotate(0deg) translateY(0px)" },
"8%": { transform: "rotate(-25deg) translateY(-4px)" },
"18%": { transform: "rotate(-10deg) translateY(-1px)" },
"28%": { transform: "rotate(-28deg) translateY(-5px)" },
"38%": { transform: "rotate(-8deg) translateY(-1px)" },
"48%": { transform: "rotate(-22deg) translateY(-3px)" },
"60%": { transform: "rotate(-5deg) translateY(0px)" },
"70%, 100%": { transform: "rotate(0deg) translateY(0px)" },
},
"chk-sway": {
"0%, 100%": { transform: "rotate(0deg)" },
"50%": { transform: "rotate(5deg)" },
},
"chk-wattle": {
"0%, 100%": { transform: "rotate(0deg) translateX(0)" },
"30%": { transform: "rotate(5deg) translateX(1px)" },
"70%": { transform: "rotate(-4deg) translateX(-1px)" },
},
"chk-beak-talk": {
"0%, 100%": { transform: "scaleY(1) translateY(0)" },
"50%": { transform: "scaleY(1.5) translateY(1px)" },
},
"chk-celebrate": {
"0%, 100%": { transform: "translateY(0)" },
"20%": { transform: "translateY(-24px)" },
"40%": { transform: "translateY(-10px)" },
"60%": { transform: "translateY(-18px)" },
"80%": { transform: "translateY(-5px)" },
},
// Confetti
cpFly: {
"0%": {
transform: "translate(-50%,-50%) scale(1)",
opacity: "1",
},
"100%": {
transform:
"translate(var(--tx), var(--ty)) scale(0.3) rotate(var(--rot))",
opacity: "0",
},
},
},
animation: {
"step-in": "stepIn 0.3s cubic-bezier(.22, 1, .36, 1) both",
"chk-bob": "chk-bob 0.8s ease-in-out infinite",
"chk-happy-bob": "chk-happy-bob 0.8s ease-in-out infinite",
"chk-thinking-bob": "chk-thinking-bob 0.8s ease-in-out infinite",
"chk-blink": "chk-blink 4s ease-in-out infinite",
"chk-thinking-eyes": "chk-thinking-eyes 1s ease-in-out infinite",
"chk-wave": "chk-wave 1.2s ease-in-out infinite",
"chk-sway": "chk-sway 2s ease-in-out infinite",
"chk-wattle": "chk-wattle 0.6s ease-in-out infinite",
"chk-beak-talk": "chk-beak-talk 0.4s ease-in-out infinite",
"chk-celebrate": "chk-celebrate 0.6s ease-out",
confetti: "cpFly 0.9s cubic-bezier(.36,.07,.19,.97) forwards",
},
transitionDuration: {
250: "250ms",
},
transitionTimingFunction: {
duolingo: "cubic-bezier(0.34, 1.56, 0.64, 1)",
},
},
},
plugins: [
function ({ addBase, addComponents, addUtilities, theme }) {
// Base styles
addBase({
html: {
scrollBehavior: "smooth",
},
"html, body, #root": {
minHeight: "100dvh",
},
body: {
fontFamily: theme("fontFamily.grotesk"),
backgroundColor: theme("colors.bg-2"),
color: theme("colors.text"),
},
"::view-transition-old(root), ::view-transition-new(root)": {
animation: "none",
mixBlendMode: "normal",
},
});
// Components
addComponents({
// CTA Button (Duolingo-style squircle)
".btn-cta": {
"@apply inline-flex items-center justify-center gap-2 px-[26px] py-[13px] rounded-md":
{},
"border-radius": "14px",
backgroundColor: theme("colors.blue"),
color: "#ffffff",
fontFamily: theme("fontFamily.grotesk"),
fontSize: "14px",
fontWeight: "700",
letterSpacing: theme("letterSpacing.mono-sm"),
textTransform: "uppercase",
boxShadow: theme("boxShadow.btn-cta"),
"@apply transition-all duration-150 cursor-pointer border-none outline-none select-none":
{},
"&:hover:not(:disabled)": {
backgroundColor: theme("colors.blue-2"),
transform: "translateY(-2px)",
boxShadow: theme("boxShadow.btn-cta-hover"),
},
"&:active:not(:disabled)": {
transform: "translateY(3px)",
boxShadow: theme("boxShadow.btn-cta-active"),
},
"&:disabled": {
opacity: "0.65",
cursor: "not-allowed",
},
},
// Ghost/Secondary Button
".btn-ghost": {
"@apply inline-flex items-center justify-center gap-2 px-[26px] py-[13px] rounded-md":
{},
"border-radius": "14px",
backgroundColor: "transparent",
color: theme("colors.text-2"),
fontFamily: theme("fontFamily.grotesk"),
fontSize: "14px",
fontWeight: "600",
letterSpacing: theme("letterSpacing.tight"),
border: `1.5px solid ${theme("colors.border-2")}`,
boxShadow: theme("boxShadow.btn-ghost"),
"@apply transition-all duration-150 cursor-pointer outline-none select-none":
{},
"&:hover:not(:disabled)": {
color: theme("colors.text"),
borderColor: theme("colors.text-3"),
boxShadow: theme("boxShadow.btn-ghost-hover"),
transform: "translateY(-1px)",
},
"&:active:not(:disabled)": {
transform: "translateY(2px)",
boxShadow: theme("boxShadow.btn-ghost-active"),
},
},
// Pill Chip
".chip": {
"@apply inline-flex items-center px-4 py-2 border-[1.5px] cursor-pointer transition-all select-none whitespace-nowrap":
{},
borderColor: theme("colors.chip-border"),
backgroundColor: theme("colors.chip-bg"),
color: theme("colors.text-2"),
fontFamily: theme("fontFamily.grotesk"),
fontSize: "13px",
fontWeight: "500",
"&:hover": {
borderColor: theme("colors.blue"),
color: theme("colors.blue"),
},
"&.selected": {
borderColor: theme("colors.chip-border-sel"),
backgroundColor: theme("colors.chip-sel"),
color: theme("colors.chip-sel-text"),
fontWeight: "600",
},
},
// Design System Input
".ds-input": {
"@apply w-full bg-bg-2 border-[1.5px] rounded-sm px-4 py-3 font-grotesk text-base text-text outline-none transition-all":
{},
borderColor: theme("colors.border"),
"&::placeholder": {
color: theme("colors.text-3"),
},
"&:focus": {
borderColor: theme("colors.blue"),
boxShadow: `0 0 0 3px ${theme("colors.blue-tint")}`,
},
"&.error": {
borderColor: theme("colors.error"),
boxShadow: "rgba(239, 68, 68, 0.2) 0 0 0 3px",
},
},
// Design System Card
".ds-card": {
"@apply rounded-lg border bg-bg shadow-md": {},
borderColor: theme("colors.border"),
},
// Mono Label/Tag
".mono-label": {
fontFamily: theme("fontFamily.mono"),
fontSize: "10px",
fontWeight: "700",
letterSpacing: theme("letterSpacing.mono"),
textTransform: "uppercase",
color: theme("colors.accent"),
},
".mono-hint": {
fontFamily: theme("fontFamily.mono"),
fontSize: "11px",
fontWeight: "400",
color: theme("colors.text-3"),
},
// Progress Dot
".prog-dot": {
"@apply w-2 h-2 rounded-full transition-all duration-250": {},
backgroundColor: theme("colors.dot"),
"&.active": {
backgroundColor: theme("colors.accent"),
"@apply scale-150": {},
},
"&.done": {
backgroundColor: theme("colors.dot-done"),
},
},
// Floating Math Symbols
".math-float": {
fontFamily: theme("fontFamily.mono"),
fontSize: "13px",
color: theme("colors.math-float"),
"@apply absolute pointer-events-none select-none": {},
lineHeight: "1",
},
// Scrollbar Hide Utility Class
".scrollbar-hide": {
"&::-webkit-scrollbar": {
display: "none",
},
"-ms-overflow-style": "none",
"scrollbar-width": "none",
},
// Chicken Entrance
".chicken-wrap": {
"@apply transition-all duration-700": {},
transform: "translateX(-140px)",
opacity: "0",
"&.in": {
"@apply opacity-100": {},
transform: "translateX(0)",
},
},
// Theme Toggle Button
".theme-toggle": {
"@apply flex items-center justify-center w-9 h-9 rounded-full border-[1.5px] bg-bg-2 text-text-2 cursor-pointer transition-all":
{},
borderColor: theme("colors.border"),
"&:hover": {
"@apply bg-bg-3": {},
transform: "rotate(20deg)",
},
},
// Confetti Particle
".confetti-particle": {
"@apply absolute w-2 h-2 rounded": {},
animation: theme("animation.confetti"),
},
});
// Utilities
addUtilities({
".step-in": {
animation: theme("animation.step-in"),
},
});
},
],
};