Skip to content

Commit baf98eb

Browse files
committed
refactor: update Tailwind CSS configuration and styles for version 4.0.0
1 parent d852d7d commit baf98eb

File tree

5 files changed

+379
-614
lines changed

5 files changed

+379
-614
lines changed

app/globals.css

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,66 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
42

3+
@plugin 'tailwindcss-animate';
54

5+
@custom-variant dark (&:is(.dark *));
6+
7+
@theme {
8+
--color-background: hsl(var(--background));
9+
--color-foreground: hsl(var(--foreground));
10+
11+
--color-card: hsl(var(--card));
12+
--color-card-foreground: hsl(var(--card-foreground));
13+
14+
--color-popover: hsl(var(--popover));
15+
--color-popover-foreground: hsl(var(--popover-foreground));
16+
17+
--color-primary: hsl(var(--primary));
18+
--color-primary-foreground: hsl(var(--primary-foreground));
19+
20+
--color-secondary: hsl(var(--secondary));
21+
--color-secondary-foreground: hsl(var(--secondary-foreground));
22+
23+
--color-muted: hsl(var(--muted));
24+
--color-muted-foreground: hsl(var(--muted-foreground));
25+
26+
--color-accent: hsl(var(--accent));
27+
--color-accent-foreground: hsl(var(--accent-foreground));
28+
29+
--color-destructive: hsl(var(--destructive));
30+
--color-destructive-foreground: hsl(var(--destructive-foreground));
31+
32+
--color-border: hsl(var(--border));
33+
--color-input: hsl(var(--input));
34+
--color-ring: hsl(var(--ring));
35+
36+
--color-chart-1: hsl(var(--chart-1));
37+
--color-chart-2: hsl(var(--chart-2));
38+
--color-chart-3: hsl(var(--chart-3));
39+
--color-chart-4: hsl(var(--chart-4));
40+
--color-chart-5: hsl(var(--chart-5));
41+
42+
--radius-lg: var(--radius);
43+
--radius-md: calc(var(--radius) - 2px);
44+
--radius-sm: calc(var(--radius) - 4px);
45+
}
46+
47+
/*
48+
The default border color has changed to `currentColor` in Tailwind CSS v4,
49+
so we've added these compatibility styles to make sure everything still
50+
looks the same as it did with Tailwind CSS v3.
51+
52+
If we ever want to remove these styles, we need to add an explicit border
53+
color utility to any element that depends on these defaults.
54+
*/
55+
@layer base {
56+
*,
57+
::after,
58+
::before,
59+
::backdrop,
60+
::file-selector-button {
61+
border-color: var(--color-gray-200, currentColor);
62+
}
63+
}
664

765
@layer base {
866
:root {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
},
2121
"devDependencies": {
2222
"@eslint/eslintrc": "^3",
23+
"@tailwindcss/postcss": "^4.0.0",
2324
"@types/node": "^20",
2425
"@types/react": "^19",
2526
"@types/react-dom": "^19",
2627
"eslint": "^9",
2728
"eslint-config-next": "15.1.7",
2829
"postcss": "^8",
29-
"tailwindcss": "^3.4.1",
30+
"tailwindcss": "^4.0.0",
3031
"typescript": "^5"
3132
}
3233
}

0 commit comments

Comments
 (0)