StateDot.module.css 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. background: currentColor;
  20. opacity: 0.1;
  21. }
  22. .dot::after {
  23. content: '';
  24. position: absolute;
  25. inset: 20%;
  26. border-radius: 50%;
  27. background: currentColor;
  28. }
  29. .dot[data-state='done'] {
  30. color: var(--dsw-alias-state-success-primary);
  31. }
  32. .dot[data-state='warning'] {
  33. color: var(--dsw-alias-state-warn-primary);
  34. }
  35. .dot[data-state='error'] {
  36. color: var(--dsw-alias-state-error-primary);
  37. }
  38. /* Pixel chase: each outer cell holds a discrete brightness step (flat keyframe
  39. * holds, no tweening — the retro feel), peaking when the chase hits it and
  40. * decaying over the next three cells. Phase offsets come from per-rect
  41. * animation-delay (index * -125ms) set inline by the component. */
  42. .matrix {
  43. flex: none;
  44. color: var(--dsh-state-ongoing);
  45. }
  46. .cell {
  47. fill: currentColor;
  48. opacity: 0.15;
  49. animation: dsh-state-dot-chase 1s infinite;
  50. }
  51. @keyframes dsh-state-dot-chase {
  52. 0%, 12.4% { opacity: 1; }
  53. 12.5%, 24.9% { opacity: 0.6; }
  54. 25%, 37.4% { opacity: 0.35; }
  55. 37.5%, 100% { opacity: 0.15; }
  56. }