|
1 | 1 | @import 'tailwindcss'; |
2 | 2 |
|
3 | | -@layer base { |
4 | | - :root { |
5 | | - --background: 0 0% 100%; |
6 | | - --foreground: 222.2 84% 4.9%; |
7 | | - --card: 0 0% 100%; |
8 | | - --card-foreground: 222.2 84% 4.9%; |
9 | | - --popover: 0 0% 100%; |
10 | | - --popover-foreground: 222.2 84% 4.9%; |
11 | | - --primary: 222.2 47.4% 11.2%; |
12 | | - --primary-foreground: 210 40% 98%; |
13 | | - --secondary: 210 40% 96%; |
14 | | - --secondary-foreground: 222.2 47.4% 11.2%; |
15 | | - --muted: 210 40% 96%; |
16 | | - --muted-foreground: 215.4 16.3% 46.9%; |
17 | | - --accent: 210 40% 96%; |
18 | | - --accent-foreground: 222.2 47.4% 11.2%; |
19 | | - --destructive: 0 84.2% 60.2%; |
20 | | - --destructive-foreground: 210 40% 98%; |
21 | | - --border: 214.3 31.8% 91.4%; |
22 | | - --input: 214.3 31.8% 91.4%; |
23 | | - --ring: 222.2 84% 4.9%; |
24 | | - --radius: 0.5rem; |
25 | | - } |
| 3 | +@theme { |
| 4 | + /* Colors - Light mode (default) */ |
| 5 | + --color-background: hsl(0 0% 100%); |
| 6 | + --color-foreground: hsl(222.2 84% 4.9%); |
| 7 | + --color-card: hsl(0 0% 100%); |
| 8 | + --color-card-foreground: hsl(222.2 84% 4.9%); |
| 9 | + --color-popover: hsl(0 0% 100%); |
| 10 | + --color-popover-foreground: hsl(222.2 84% 4.9%); |
| 11 | + --color-primary: hsl(222.2 47.4% 11.2%); |
| 12 | + --color-primary-foreground: hsl(210 40% 98%); |
| 13 | + --color-secondary: hsl(210 40% 96%); |
| 14 | + --color-secondary-foreground: hsl(222.2 47.4% 11.2%); |
| 15 | + --color-muted: hsl(210 40% 96%); |
| 16 | + --color-muted-foreground: hsl(215.4 16.3% 46.9%); |
| 17 | + --color-accent: hsl(210 40% 96%); |
| 18 | + --color-accent-foreground: hsl(222.2 47.4% 11.2%); |
| 19 | + --color-destructive: hsl(0 84.2% 60.2%); |
| 20 | + --color-destructive-foreground: hsl(210 40% 98%); |
| 21 | + --color-border: hsl(214.3 31.8% 91.4%); |
| 22 | + --color-input: hsl(214.3 31.8% 91.4%); |
| 23 | + --color-ring: hsl(222.2 84% 4.9%); |
| 24 | + |
| 25 | + /* Border radius */ |
| 26 | + --radius: 0.5rem; |
| 27 | + --radius-lg: var(--radius); |
| 28 | + --radius-md: calc(var(--radius) - 2px); |
| 29 | + --radius-sm: calc(var(--radius) - 4px); |
| 30 | +} |
26 | 31 |
|
27 | | - .dark { |
28 | | - --background: 222.2 84% 4.9%; |
29 | | - --foreground: 210 40% 98%; |
30 | | - --card: 222.2 84% 4.9%; |
31 | | - --card-foreground: 210 40% 98%; |
32 | | - --popover: 222.2 84% 4.9%; |
33 | | - --popover-foreground: 210 40% 98%; |
34 | | - --primary: 210 40% 98%; |
35 | | - --primary-foreground: 222.2 47.4% 11.2%; |
36 | | - --secondary: 217.2 32.6% 17.5%; |
37 | | - --secondary-foreground: 210 40% 98%; |
38 | | - --muted: 217.2 32.6% 17.5%; |
39 | | - --muted-foreground: 215 20.2% 65.1%; |
40 | | - --accent: 217.2 32.6% 17.5%; |
41 | | - --accent-foreground: 210 40% 98%; |
42 | | - --destructive: 0 62.8% 30.6%; |
43 | | - --destructive-foreground: 210 40% 98%; |
44 | | - --border: 217.2 32.6% 17.5%; |
45 | | - --input: 217.2 32.6% 17.5%; |
46 | | - --ring: 212.7 26.8% 83.9%; |
| 32 | +/* Dark mode variant */ |
| 33 | +@custom-variant dark (&:where(.dark, .dark *)); |
| 34 | + |
| 35 | +@layer base { |
| 36 | + @variant dark { |
| 37 | + --color-background: hsl(222.2 84% 4.9%); |
| 38 | + --color-foreground: hsl(210 40% 98%); |
| 39 | + --color-card: hsl(222.2 84% 4.9%); |
| 40 | + --color-card-foreground: hsl(210 40% 98%); |
| 41 | + --color-popover: hsl(222.2 84% 4.9%); |
| 42 | + --color-popover-foreground: hsl(210 40% 98%); |
| 43 | + --color-primary: hsl(210 40% 98%); |
| 44 | + --color-primary-foreground: hsl(222.2 47.4% 11.2%); |
| 45 | + --color-secondary: hsl(217.2 32.6% 17.5%); |
| 46 | + --color-secondary-foreground: hsl(210 40% 98%); |
| 47 | + --color-muted: hsl(217.2 32.6% 17.5%); |
| 48 | + --color-muted-foreground: hsl(215 20.2% 65.1%); |
| 49 | + --color-accent: hsl(217.2 32.6% 17.5%); |
| 50 | + --color-accent-foreground: hsl(210 40% 98%); |
| 51 | + --color-destructive: hsl(0 62.8% 30.6%); |
| 52 | + --color-destructive-foreground: hsl(210 40% 98%); |
| 53 | + --color-border: hsl(217.2 32.6% 17.5%); |
| 54 | + --color-input: hsl(217.2 32.6% 17.5%); |
| 55 | + --color-ring: hsl(212.7 26.8% 83.9%); |
47 | 56 | } |
48 | 57 | } |
49 | 58 |
|
|
55 | 64 | @apply bg-background text-foreground; |
56 | 65 | } |
57 | 66 | } |
58 | | - |
|
0 commit comments