|
| 1 | +/* CSS Custom Properties for Dark Mode Support */ |
| 2 | +:root { |
| 3 | + /* Light theme pulse animation colors */ |
| 4 | + --pulse-bg-start: theme("colors.blue.100"); |
| 5 | + --pulse-bg-mid: theme("colors.blue.200"); |
| 6 | + --pulse-text-start: theme("colors.blue.800"); |
| 7 | + --pulse-text-mid: theme("colors.blue.900"); |
| 8 | +} |
| 9 | + |
| 10 | +@media (prefers-color-scheme: dark) { |
| 11 | + :root { |
| 12 | + /* Dark theme pulse animation colors */ |
| 13 | + --pulse-bg-start: theme("colors.blue.900"); |
| 14 | + --pulse-bg-mid: theme("colors.blue.800"); |
| 15 | + --pulse-text-start: theme("colors.blue.100"); |
| 16 | + --pulse-text-mid: theme("colors.blue.200"); |
| 17 | + } |
| 18 | +} |
| 19 | + |
| 20 | +@theme { |
| 21 | + --animate-pulse-blue: pulse-blue 2s ease-in-out infinite; |
| 22 | + --animate-selection-pulse: selection-pulse 2s ease-in-out infinite; |
| 23 | + --animate-bounce-error: bounce-error 0.6s ease-out; |
| 24 | + --animate-status-to-success: statusToSuccess 600ms ease-out forwards; |
| 25 | + --animate-status-attention: statusAttention 600ms ease-out forwards; |
| 26 | + --animate-query-item-status-change: queryItemStatusChange 300ms ease-out |
| 27 | + forwards; |
| 28 | + |
| 29 | + @keyframes pulse-blue { |
| 30 | + 0%, |
| 31 | + 100% { |
| 32 | + background-color: var(--pulse-bg-start); |
| 33 | + color: var(--pulse-text-start); |
| 34 | + } |
| 35 | + 50% { |
| 36 | + background-color: var(--pulse-bg-mid); |
| 37 | + color: var(--pulse-text-mid); |
| 38 | + } |
| 39 | + } |
| 40 | + |
| 41 | + @keyframes statusToSuccess { |
| 42 | + 0% { |
| 43 | + transform: scale(1); |
| 44 | + box-shadow: 0 0 0 0 rgb(theme("colors.green.500") / 0.3); |
| 45 | + } |
| 46 | + 50% { |
| 47 | + transform: scale(1.05); |
| 48 | + box-shadow: 0 0 0 4px rgb(theme("colors.green.500") / 0.1); |
| 49 | + } |
| 50 | + 100% { |
| 51 | + transform: scale(1); |
| 52 | + box-shadow: 0 0 0 0 rgb(theme("colors.green.500") / 0); |
| 53 | + } |
| 54 | + } |
| 55 | + |
| 56 | + @keyframes statusAttention { |
| 57 | + 0% { |
| 58 | + transform: scale(1); |
| 59 | + box-shadow: 0 0 0 0 rgb(theme("colors.red.500") / 0.4); |
| 60 | + } |
| 61 | + 50% { |
| 62 | + transform: scale(1.15); |
| 63 | + box-shadow: 0 0 0 6px rgb(theme("colors.red.500") / 0.2); |
| 64 | + } |
| 65 | + 100% { |
| 66 | + transform: scale(1); |
| 67 | + box-shadow: 0 0 0 0 rgb(theme("colors.red.500") / 0); |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + @keyframes selection-pulse { |
| 72 | + 0%, |
| 73 | + 100% { |
| 74 | + box-shadow: 0 0 0 0 rgb(theme("colors.blue.500") / 0.4); |
| 75 | + } |
| 76 | + 50% { |
| 77 | + box-shadow: 0 0 0 8px rgb(theme("colors.blue.500") / 0); |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + @keyframes bounce-error { |
| 82 | + 0%, |
| 83 | + 20%, |
| 84 | + 50%, |
| 85 | + 80%, |
| 86 | + 100% { |
| 87 | + transform: translateY(0); |
| 88 | + } |
| 89 | + 40% { |
| 90 | + transform: translateY(-4px); |
| 91 | + } |
| 92 | + 60% { |
| 93 | + transform: translateY(-2px); |
| 94 | + } |
| 95 | + } |
| 96 | + |
| 97 | + @keyframes queryItemStatusChange { |
| 98 | + 0% { |
| 99 | + background-color: transparent; |
| 100 | + } |
| 101 | + 50% { |
| 102 | + background-color: rgb(theme("colors.blue.50") / 0.3); |
| 103 | + } |
| 104 | + 100% { |
| 105 | + background-color: transparent; |
| 106 | + } |
| 107 | + } |
| 108 | +} |
| 109 | + |
1 | 110 | @layer animations { |
2 | 111 | /* Reusable Collapsible Component Animation */ |
3 | 112 | .collapsible-container { |
|
66 | 175 |
|
67 | 176 | /* Selection Animations */ |
68 | 177 | .card-selection-animated.card-selected { |
69 | | - animation: selection-pulse 2s ease-in-out infinite; |
| 178 | + @apply animate-selection-pulse; |
70 | 179 | } |
71 | 180 |
|
72 | 181 | /* List Item Micro-Interactions */ |
|
103 | 212 | } |
104 | 213 |
|
105 | 214 | .status-badge-animated.status-blue { |
106 | | - animation: pulse-blue 2s ease-in-out infinite; |
| 215 | + @apply animate-pulse-blue; |
107 | 216 | } |
108 | 217 |
|
109 | 218 | .status-badge-animated.status-red { |
110 | | - animation: bounce-error 0.6s ease-out; |
| 219 | + @apply animate-bounce-error; |
111 | 220 | } |
112 | 221 |
|
113 | 222 | /* List Item Stagger Animations */ |
|
262 | 371 | will-change: transform, opacity; |
263 | 372 | } |
264 | 373 |
|
265 | | - .loading-refresh { |
266 | | - animation: pulse-blue 1s ease-in-out 2; |
267 | | - will-change: background-color; |
268 | | - } |
269 | | - |
270 | 374 | .loading-background { |
271 | 375 | opacity: 0.7; |
272 | 376 | animation: skeleton-pulse 3s ease-in-out infinite; |
|
358 | 462 | } |
359 | 463 | } |
360 | 464 |
|
361 | | - @keyframes pulse-blue { |
362 | | - 0%, |
363 | | - 100% { |
364 | | - background-color: rgb(var(--color-blue-100)); |
365 | | - color: rgb(var(--color-blue-800)); |
366 | | - } |
367 | | - 50% { |
368 | | - background-color: rgb(var(--color-blue-200)); |
369 | | - color: rgb(var(--color-blue-900)); |
370 | | - } |
371 | | - } |
372 | | - |
373 | 465 | @keyframes bounce-error { |
374 | 466 | 0%, |
375 | 467 | 20%, |
|
448 | 540 | } |
449 | 541 |
|
450 | 542 | .status-to-success { |
451 | | - animation: statusToSuccess 600ms ease-out forwards; |
| 543 | + @apply animate-status-to-success; |
452 | 544 | } |
453 | 545 |
|
454 | 546 | .status-to-stale { |
|
464 | 556 | } |
465 | 557 |
|
466 | 558 | .status-attention { |
467 | | - animation: statusAttention 600ms ease-out forwards; |
| 559 | + @apply animate-status-attention; |
468 | 560 | } |
469 | 561 |
|
470 | 562 | .status-fade-gentle { |
|
473 | 565 |
|
474 | 566 | /* Container animations for state changes */ |
475 | 567 | .query-item-status-change { |
476 | | - animation: queryItemStatusChange 300ms ease-out forwards; |
| 568 | + @apply animate-query-item-status-change; |
477 | 569 | } |
478 | 570 |
|
479 | 571 | /* State Transition Keyframes - Phase 6D */ |
|
619 | 711 | .skeleton-json, |
620 | 712 | .loading-sequence, |
621 | 713 | .loading-initial, |
622 | | - .loading-refresh, |
623 | 714 | .loading-background, |
624 | 715 | .skeleton-to-content, |
625 | 716 | .status-transition, |
|
0 commit comments