|
50 | 50 | }
|
51 | 51 |
|
52 | 52 | .dark {
|
53 |
| - --background: hsl(253, 21%, 13%); |
54 |
| - background-image: url(../assets/background-art-dark.svg); |
55 |
| - --foreground: hsl(210 40% 98%); |
56 |
| - --card: hsl(222.2 84% 4.9%); |
57 |
| - --card-foreground: hsl(210 40% 98%); |
58 |
| - --popover: hsl(222.2 84% 4.9%); |
59 |
| - --popover-foreground: hsl(210 40% 98%); |
60 |
| - --primary: hsl(210 40% 98%); |
61 |
| - --primary-foreground: hsl(222.2 47.4% 11.2%); |
62 |
| - --secondary: hsl(217.2 32.6% 17.5%); |
63 |
| - --secondary-foreground: hsl(210 40% 98%); |
64 |
| - --muted: hsl(217.2 32.6% 17.5%); |
65 |
| - --muted-foreground: hsl(215 20.2% 65.1%); |
66 |
| - --accent: hsl(217.2 32.6% 17.5%); |
67 |
| - --accent-foreground: hsl(210 40% 98%); |
68 |
| - --destructive: hsl(0 62.8% 30.6%); |
69 |
| - --destructive-foreground: hsl(210 40% 98%); |
70 |
| - --border: hsl(217.2 32.6% 17.5%); |
71 |
| - --input: hsl(217.2 32.6% 17.5%); |
72 |
| - --ring: hsl(212.7 26.8% 83.9%); |
73 |
| - --chart-1: hsl(220 70% 50%); |
74 |
| - --chart-2: hsl(160 60% 45%); |
75 |
| - --chart-3: hsl(30 80% 55%); |
76 |
| - --chart-4: hsl(280 65% 60%); |
77 |
| - --chart-5: hsl(340 75% 55%); |
| 53 | + /* Base dark theme with purple tones instead of generic dark gray */ |
| 54 | + --white: hsl(262, 30%, 10%); |
| 55 | + --grey-dark: hsl(262, 15%, 30%); |
| 56 | + --grey-light: hsl(262, 20%, 15%); |
| 57 | + |
| 58 | + /* Keep accent colors but adjusted for dark mode */ |
| 59 | + --blue: hsl(227, 70%, 60%); |
| 60 | + --green: hsl(158, 54%, 45%); |
| 61 | + --red: hsl(7, 90%, 65%); |
| 62 | + --yellow: hsl(49, 90%, 65%); |
| 63 | + |
| 64 | + /* Adjust the purples for dark mode */ |
| 65 | + --purple-dark: hsl(262, 36%, 75%); |
| 66 | + --purple-light: hsl(251, 60%, 65%); |
| 67 | + |
| 68 | + /* Theme variables */ |
| 69 | + --background: hsl(262, 30%, 8%); |
| 70 | + --foreground: hsl(262, 36%, 85%); |
| 71 | + --card: hsl(262, 25%, 12%); |
| 72 | + --card-foreground: hsl(262, 36%, 90%); |
| 73 | + --popover: hsl(262, 25%, 12%); |
| 74 | + --popover-foreground: hsl(262, 36%, 90%); |
| 75 | + --primary: var(--purple-light); |
| 76 | + --primary-foreground: hsl(262, 30%, 10%); |
| 77 | + --secondary: hsl(262, 20%, 20%); |
| 78 | + --secondary-foreground: hsl(262, 36%, 85%); |
| 79 | + --muted: hsl(262, 15%, 25%); |
| 80 | + --muted-foreground: hsl(262, 10%, 70%); |
| 81 | + --accent: hsl(251, 30%, 25%); |
| 82 | + --accent-foreground: hsl(262, 36%, 90%); |
| 83 | + --destructive: var(--red); |
| 84 | + --destructive-foreground: hsl(262, 36%, 90%); |
| 85 | + --border: hsl(262, 20%, 25%); |
| 86 | + --input: hsl(262, 20%, 25%); |
| 87 | + --ring: var(--purple-light); |
| 88 | + |
| 89 | + /* Chart colors for dark mode */ |
| 90 | + --chart-1: hsl(12 76% 55%); |
| 91 | + --chart-2: hsl(173 58% 45%); |
| 92 | + --chart-3: hsl(197 37% 45%); |
| 93 | + --chart-4: hsl(43 74% 60%); |
| 94 | + --chart-5: hsl(27 87% 60%); |
78 | 95 | }
|
79 | 96 | }
|
80 | 97 |
|
|
95 | 112 | /* background-clip: border-box | padding-box | content-box; */
|
96 | 113 | /* background-blend-mode: multiply | screen | overlay; */
|
97 | 114 | }
|
| 115 | + |
| 116 | + .dark body { |
| 117 | + background-image: url(../assets/background-art-dark.svg); |
| 118 | + } |
98 | 119 | }
|
99 | 120 |
|
100 | 121 | /*************************** TYPOGRAPHY *************************/
|
|
122 | 143 | @apply scroll-m-20 text-[20px] font-default lg:text-[24px];
|
123 | 144 | }
|
124 | 145 | }
|
| 146 | +@layer utilities { |
| 147 | + /* Additional dark mode refinements */ |
| 148 | + .dark .bg-white { |
| 149 | + @apply bg-gray-800 text-gray-200; |
| 150 | + } |
| 151 | + |
| 152 | + .dark pre { |
| 153 | + @apply bg-gray-800 text-gray-200; |
| 154 | + } |
| 155 | + |
| 156 | + .dark table th { |
| 157 | + @apply text-gray-300; |
| 158 | + } |
| 159 | + |
| 160 | + .dark .border-gray-300 { |
| 161 | + @apply border-gray-700; |
| 162 | + } |
| 163 | + |
| 164 | + /* Improve readability of code and text blocks */ |
| 165 | + .dark code, |
| 166 | + .dark pre { |
| 167 | + @apply bg-gray-800 text-gray-200 border border-gray-700; |
| 168 | + } |
| 169 | + |
| 170 | + /* Fix for data tables in dark mode */ |
| 171 | + .dark [data-state="selected"] { |
| 172 | + background-color: rgba(113, 94, 194, 0.2); |
| 173 | + } |
| 174 | + |
| 175 | + .dark .hover\:bg-muted\/50:hover { |
| 176 | + background-color: rgba(113, 94, 194, 0.1); |
| 177 | + } |
| 178 | + |
| 179 | + /* Improve input fields in dark mode */ |
| 180 | + .dark input, |
| 181 | + .dark select, |
| 182 | + .dark textarea { |
| 183 | + @apply bg-gray-800 border-gray-700 text-gray-200; |
| 184 | + } |
| 185 | + |
| 186 | + .dark ::placeholder { |
| 187 | + @apply text-gray-500; |
| 188 | + } |
| 189 | + |
| 190 | + /* Shadow adjustments for dark mode */ |
| 191 | + .dark .shadow-md, |
| 192 | + .dark .shadow-lg { |
| 193 | + box-shadow: |
| 194 | + 0 4px 6px -1px rgba(0, 0, 0, 0.3), |
| 195 | + 0 2px 4px -2px rgba(0, 0, 0, 0.2); |
| 196 | + } |
| 197 | +} |
0 commit comments