StateDot.module.css 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* Ongoing blue has no alias token (state-business-primary is the 500 step,
  2. * not this 450) — component-level var pinned to the static scale instead. */
  3. .dot,
  4. .matrix {
  5. --dsh-state-ongoing: var(--dsw-static-deepseek-450);
  6. }
  7. /* Solid states: same-color halo via a 0.10-opacity outer layer (::before)
  8. * with a 6/10-scale solid core. Layer color rides currentColor set per state. */
  9. .dot {
  10. position: relative;
  11. display: inline-block;
  12. flex: none;
  13. }
  14. .dot::before {
  15. content: '';
  16. position: absolute;
  17. inset: 0;
  18. border-radius: 50%;
  19. corner-shape: round;
  20. background: currentColor;
  21. opacity: 0.1;
  22. }
  23. .dot::after {
  24. content: '';
  25. position: absolute;
  26. inset: 20%;
  27. border-radius: 50%;
  28. corner-shape: round;
  29. background: currentColor;
  30. }
  31. .dot[data-state='done'] {
  32. color: var(--dsw-alias-state-success-primary);
  33. }
  34. .dot[data-state='warning'] {
  35. color: var(--dsw-alias-state-warn-primary);
  36. }
  37. .dot[data-state='error'] {
  38. color: var(--dsw-alias-state-error-primary);
  39. }
  40. /* Idle is the absence of activity, not a fourth outcome: it stays on the
  41. * tertiary label color so it recedes beside the three outcome colors. */
  42. .dot[data-state='idle'] {
  43. color: var(--dsw-alias-label-tertiary);
  44. }
  45. /* Pixel chase: each outer cell holds a discrete brightness step (flat keyframe
  46. * holds, no tweening — the retro feel), peaking when the chase hits it and
  47. * decaying over the next three cells. Phase offsets come from per-rect
  48. * animation-delay (index * -125ms) set inline by the component. */
  49. .matrix {
  50. flex: none;
  51. color: var(--dsh-state-ongoing);
  52. }
  53. .cell {
  54. fill: currentColor;
  55. opacity: 0.15;
  56. animation: dsh-state-dot-chase 1s infinite;
  57. }
  58. @keyframes dsh-state-dot-chase {
  59. 0%, 12.4% { opacity: 1; }
  60. 12.5%, 24.9% { opacity: 0.6; }
  61. 25%, 37.4% { opacity: 0.35; }
  62. 37.5%, 100% { opacity: 0.15; }
  63. }