|
3 | 3 |
|
4 | 4 | @use '../tokens' as *; |
5 | 5 |
|
6 | | -[data-tutor-theme='dark'] { |
| 6 | +// Mixin containing all dark theme tokens |
| 7 | +@mixin dark-theme-tokens { |
7 | 8 | // ============================================================================= |
8 | 9 | // SURFACE COLORS |
9 | 10 | // ============================================================================= |
|
143 | 144 | --tutor-tab-sidebar-l4-active: #{$tutor-gray-750}; |
144 | 145 | --tutor-tab-l3: #{$tutor-gray-750}; |
145 | 146 | --tutor-tab-l3-hover: #{$tutor-gray-700}; |
146 | | - --tutor-tab-l3-active: #{$tutor-gray-900}; |
| 147 | + --tutor-tab-l3-active: #{$tutor-gray-750}; |
147 | 148 | --tutor-tab-l3-active-hover: #{$tutor-gray-750}; |
148 | 149 |
|
149 | 150 | // ============================================================================= |
|
187 | 188 | --tutor-visual-gray-1: #{$tutor-gray-800}; |
188 | 189 | --tutor-visual-gray-2: #{$tutor-gray-700}; |
189 | 190 | --tutor-visual-gray-3: #{$tutor-gray-600}; |
| 191 | + --tutor-visual-gray-4: #{$tutor-yellow-800}; |
190 | 192 | --tutor-visual-brand-1: #{$tutor-brand-600}; |
191 | 193 | --tutor-visual-brand-2: #{$tutor-brand-800}; |
| 194 | + --tutor-visual-brand-3: #{$tutor-brand-900}; |
192 | 195 | --tutor-visual-success-1: #{$tutor-success-500}; |
| 196 | + --tutor-visual-success-2: #{$tutor-success-500}; |
193 | 197 | --tutor-visual-critical-1: #{$tutor-error-600}; |
| 198 | + --tutor-visual-critical-2: #{$tutor-error-900}; |
194 | 199 | --tutor-visual-caution-1: #{$tutor-yellow-600}; |
| 200 | + --tutor-visual-caution-2: #{$tutor-yellow-700}; |
| 201 | + --tutor-visual-caution-3: #{$tutor-yellow-900}; |
| 202 | + --tutor-visual-orange-1: #{$tutor-orange-400}; |
| 203 | + --tutor-visual-exception-1: #{$tutor-exception-3}; |
| 204 | + --tutor-visual-exception-2: #{$tutor-exception-9}; |
| 205 | + --tutor-visual-exception-3: #{$tutor-exception-2}; |
195 | 206 |
|
196 | 207 | // ============================================================================= |
197 | 208 | // TYPOGRAPHY TOKENS |
|
214 | 225 | --tutor-shadow-2xl: #{$tutor-shadow-2xl}; |
215 | 226 | --tutor-shadow-3xl: #{$tutor-shadow-3xl}; |
216 | 227 | } |
| 228 | + |
| 229 | +// Apply dark theme when explicitly set |
| 230 | +[data-tutor-theme='dark'] { |
| 231 | + @include dark-theme-tokens; |
| 232 | +} |
| 233 | + |
| 234 | +// Apply dark theme when system preference is dark |
| 235 | +// This prevents flash of light theme before JS loads |
| 236 | +@media (prefers-color-scheme: dark) { |
| 237 | + [data-tutor-theme='system'] { |
| 238 | + @include dark-theme-tokens; |
| 239 | + } |
| 240 | +} |
0 commit comments