|
6 | 6 |
|
7 | 7 | /* You can override the default Infima variables here. */
|
8 | 8 | @import "tailwindcss";
|
| 9 | + |
| 10 | +/* ===== INSTANT THEME TRANSITIONS ===== */ |
| 11 | +html { |
| 12 | + transition: background-color 0.15s ease, color 0.15s ease !important; |
| 13 | +} |
| 14 | + |
| 15 | +body { |
| 16 | + transition: background-color 0.15s ease, color 0.15s ease !important; |
| 17 | +} |
| 18 | + |
| 19 | +/* Instant transitions for theme-sensitive elements */ |
| 20 | +*, |
| 21 | +*::before, |
| 22 | +*::after { |
| 23 | + transition: |
| 24 | + background-color 0.15s ease, |
| 25 | + color 0.15s ease, |
| 26 | + border-color 0.15s ease, |
| 27 | + box-shadow 0.15s ease !important; |
| 28 | +} |
| 29 | + |
| 30 | +/* Very fast transitions for interactive elements */ |
| 31 | +button, |
| 32 | +.button, |
| 33 | +a, |
| 34 | +input, |
| 35 | +select, |
| 36 | +textarea { |
| 37 | + transition: |
| 38 | + all 0.1s ease !important; |
| 39 | +} |
| 40 | + |
| 41 | +/* Instant navbar theme change */ |
| 42 | +.navbar, |
| 43 | +.navbar__inner, |
| 44 | +.navbar__brand, |
| 45 | +.navbar__item, |
| 46 | +.navbar__link { |
| 47 | + transition: |
| 48 | + background-color 0.1s ease, |
| 49 | + color 0.1s ease !important; |
| 50 | +} |
| 51 | + |
| 52 | +/* Force instant theme updates for key elements */ |
| 53 | +[data-theme='light'] .navbar { |
| 54 | + background-color: #ffffff !important; |
| 55 | + color: #1a202c !important; |
| 56 | +} |
| 57 | + |
| 58 | +[data-theme='dark'] .navbar { |
| 59 | + background-color: #121212 !important; |
| 60 | + color: #ffffff !important; |
| 61 | +} |
| 62 | + |
| 63 | +[data-theme='light'] .navbar__link { |
| 64 | + color: #1a202c !important; |
| 65 | +} |
| 66 | + |
| 67 | +[data-theme='dark'] .navbar__link { |
| 68 | + color: #ffffff !important; |
| 69 | +} |
| 70 | + |
9 | 71 | :root {
|
10 | 72 | --ifm-color-primary: #2e8555;
|
11 | 73 | --ifm-color-primary-dark: #29784c;
|
|
18 | 80 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
19 | 81 | --ifm-color-primary-text: white;
|
20 | 82 | --ifm-color-secondary-text: #edf2f7;
|
| 83 | + |
| 84 | + /* Light theme defaults */ |
| 85 | + --ifm-background-color: #ffffff; |
| 86 | + --ifm-font-color-base: #000000; |
21 | 87 | }
|
22 | 88 |
|
23 | 89 | /* For readability concerns, you should choose a lighter palette in dark mode. */
|
|
33 | 99 | --ifm-color-primary-text: #ffffff;
|
34 | 100 | --ifm-color-secondary-text: #edf2f7;
|
35 | 101 |
|
| 102 | + /* Dark theme background and text */ |
| 103 | + --ifm-background-color: #121212; |
| 104 | + --ifm-font-color-base: #ffffff; |
| 105 | + |
36 | 106 | /* Standardized Dark Theme Colors */
|
37 | 107 | --dark-bg-primary: #121212;
|
38 | 108 | --dark-bg-secondary: #1a1a1a;
|
|
181 | 251 | color: transparent;
|
182 | 252 | }
|
183 | 253 |
|
184 |
| -/* Light mode background and text fix - EXCLUDE community page */ |
185 |
| -[data-theme='light'] body:not(:has(.community-page)) { |
186 |
| - --ifm-background-color: #ffffff; /* white background */ |
187 |
| - --ifm-font-color-base: #000000; /* black text */ |
188 |
| - background-color: var(--ifm-background-color); |
189 |
| - color: var(--ifm-font-color-base); |
| 254 | +/* ===== THEME OVERRIDES - CLEAN APPROACH ===== */ |
| 255 | + |
| 256 | +/* Light theme - Clean background */ |
| 257 | +[data-theme='light'] { |
| 258 | + --ifm-background-color: #ffffff; |
| 259 | + --ifm-font-color-base: #1a202c; |
| 260 | + --ifm-card-background-color: #ffffff; |
| 261 | +} |
| 262 | + |
| 263 | +[data-theme='light'] body { |
| 264 | + background-color: var(--ifm-background-color) !important; |
| 265 | + color: var(--ifm-font-color-base) !important; |
190 | 266 | }
|
191 | 267 |
|
192 |
| -/* Dark mode overrides - EXCLUDE community page */ |
193 |
| -[data-theme='dark'] body:not(:has(.community-page)) { |
194 |
| - background-color: var(--dark-bg-primary); |
195 |
| - color: var(--dark-text-primary); |
| 268 | +/* Dark theme - Clean background */ |
| 269 | +[data-theme='dark'] { |
| 270 | + --ifm-background-color: #121212; |
| 271 | + --ifm-font-color-base: #ffffff; |
| 272 | + --ifm-card-background-color: #1a1a1a; |
| 273 | +} |
| 274 | + |
| 275 | +[data-theme='dark'] body { |
| 276 | + background-color: var(--ifm-background-color) !important; |
| 277 | + color: var(--ifm-font-color-base) !important; |
196 | 278 | }
|
197 | 279 |
|
198 | 280 | /* Global dark theme utilities */
|
|
253 | 335 | color: var(--dark-text-muted) !important;
|
254 | 336 | }
|
255 | 337 |
|
256 |
| -/* Button dark theme */ |
257 |
| -[data-theme='dark'] .button, |
258 |
| -[data-theme='dark'] button { |
259 |
| - background-color: var(--dark-bg-tertiary); |
260 |
| - color: var(--dark-text-primary); |
261 |
| - border-color: var(--dark-border); |
| 338 | +/* ===== CLEAN BUTTON FIXES ===== */ |
| 339 | + |
| 340 | +/* Remove conflicting button styles - let Docusaurus handle it naturally */ |
| 341 | +[data-theme='light'] .button--outline, |
| 342 | +[data-theme='light'] .button--secondary { |
| 343 | + background-color: transparent !important; |
| 344 | + color: var(--ifm-font-color-base) !important; |
| 345 | + border: 1px solid var(--ifm-color-emphasis-300) !important; |
| 346 | +} |
| 347 | + |
| 348 | +[data-theme='dark'] .button--outline, |
| 349 | +[data-theme='dark'] .button--secondary { |
| 350 | + background-color: transparent !important; |
| 351 | + color: var(--ifm-font-color-base) !important; |
| 352 | + border: 1px solid var(--ifm-color-emphasis-300) !important; |
262 | 353 | }
|
263 | 354 |
|
264 |
| -[data-theme='dark'] .button:hover, |
265 |
| -[data-theme='dark'] button:hover { |
266 |
| - background-color: var(--dark-card-hover-bg); |
| 355 | +/* ===== MINIMAL THEME FIXES ===== */ |
| 356 | + |
| 357 | +/* Only fix specific problematic elements */ |
| 358 | +[data-theme='light'] .card { |
| 359 | + background-color: var(--ifm-card-background-color) !important; |
| 360 | + color: var(--ifm-font-color-base) !important; |
| 361 | +} |
| 362 | + |
| 363 | +[data-theme='dark'] .card { |
| 364 | + background-color: var(--ifm-card-background-color) !important; |
| 365 | + color: var(--ifm-font-color-base) !important; |
267 | 366 | }
|
268 | 367 |
|
269 | 368 | /* Card components dark theme */
|
@@ -812,3 +911,53 @@ html {
|
812 | 911 | color: inherit;
|
813 | 912 | }
|
814 | 913 |
|
| 914 | +/* ===== STEP 3: BASIC FOOTER PROTECTION ===== */ |
| 915 | +/* Prevent global dark theme container rule from affecting footer */ |
| 916 | +[data-theme='dark'] .enhanced-footer .container { |
| 917 | + background-color: transparent !important; |
| 918 | +} |
| 919 | + |
| 920 | +/* ===== STEP 4: FOOTER BACKGROUND PROTECTION ===== */ |
| 921 | +/* Ensure footer maintains its gradient background in dark mode */ |
| 922 | +[data-theme='dark'] .enhanced-footer { |
| 923 | + background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%) !important; |
| 924 | + color: #e2e8f0 !important; |
| 925 | +} |
| 926 | + |
| 927 | +/* ===== STEP 5: FOOTER SECTION PROTECTION ===== */ |
| 928 | +/* Protect specific footer sections from global overrides */ |
| 929 | +[data-theme='dark'] .enhanced-footer .footer-links-section { |
| 930 | + background: rgba(0, 0, 0, 0.15) !important; |
| 931 | +} |
| 932 | + |
| 933 | +[data-theme='dark'] .enhanced-footer .footer-bottom { |
| 934 | + background: rgba(0, 0, 0, 0.2) !important; |
| 935 | +} |
| 936 | + |
| 937 | +/* ===== STEP 6: MAXIMUM SPECIFICITY PROTECTION ===== */ |
| 938 | +/* Override the exact problematic global rule with same specificity */ |
| 939 | +[data-theme='dark'] body:not(:has(.community-page)) .enhanced-footer .container { |
| 940 | + background-color: transparent !important; |
| 941 | +} |
| 942 | + |
| 943 | +[data-theme='dark'] body:not(:has(.community-page)) .enhanced-footer { |
| 944 | + background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%) !important; |
| 945 | + color: #e2e8f0 !important; |
| 946 | +} |
| 947 | + |
| 948 | +/* ===== STEP 7: COMPREHENSIVE ELEMENT PROTECTION ===== */ |
| 949 | +/* Protect all footer elements from any global overrides */ |
| 950 | +[data-theme='dark'] .enhanced-footer *, |
| 951 | +[data-theme='dark'] .enhanced-footer .row, |
| 952 | +[data-theme='dark'] .enhanced-footer .col, |
| 953 | +[data-theme='dark'] .enhanced-footer div, |
| 954 | +[data-theme='dark'] .enhanced-footer section { |
| 955 | + background-color: transparent !important; |
| 956 | +} |
| 957 | + |
| 958 | +/* Ensure text colors inherit properly */ |
| 959 | +[data-theme='dark'] .enhanced-footer, |
| 960 | +[data-theme='dark'] .enhanced-footer * { |
| 961 | + color: inherit !important; |
| 962 | +} |
| 963 | + |
0 commit comments