_ping.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @keyframes ping-warning {
  2. 0% {
  3. box-shadow: 0 0 0 0
  4. hsla(
  5. var(--w-color-warning-100-hue),
  6. var(--w-color-warning-100-saturation),
  7. var(--w-color-warning-100-lightness),
  8. 0.7
  9. );
  10. }
  11. 25% {
  12. box-shadow: 0 0 0 10px
  13. hsla(
  14. var(--w-color-warning-100-hue),
  15. var(--w-color-warning-100-saturation),
  16. var(--w-color-warning-100-lightness),
  17. 0
  18. );
  19. }
  20. 50% {
  21. box-shadow: 0 0 0 0
  22. hsla(
  23. var(--w-color-warning-100-hue),
  24. var(--w-color-warning-100-saturation),
  25. var(--w-color-warning-100-lightness),
  26. 0
  27. );
  28. }
  29. }
  30. @keyframes ping-critical {
  31. 0% {
  32. box-shadow: 0 0 0 0
  33. hsla(
  34. var(--w-color-critical-100-hue),
  35. var(--w-color-critical-100-saturation),
  36. var(--w-color-critical-100-lightness),
  37. 0.7
  38. );
  39. }
  40. 25% {
  41. box-shadow: 0 0 0 8px
  42. hsla(
  43. var(--w-color-critical-100-hue),
  44. var(--w-color-critical-100-saturation),
  45. var(--w-color-critical-100-lightness),
  46. 0
  47. );
  48. }
  49. 50% {
  50. box-shadow: 0 0 0 0
  51. hsla(
  52. var(--w-color-critical-100-hue),
  53. var(--w-color-critical-100-saturation),
  54. var(--w-color-critical-100-lightness),
  55. 0
  56. );
  57. }
  58. }
  59. .w-ping {
  60. &.w-ping--critical {
  61. @media (prefers-reduced-motion: no-preference) {
  62. animation: ping-critical 5s 5;
  63. }
  64. }
  65. }