_dismissible.scss 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @keyframes pulse-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. .w-dismissible-badge {
  31. border-radius: theme('borderRadius.full');
  32. background-color: theme('colors.warning.100');
  33. flex-shrink: 0;
  34. min-width: theme('spacing.[2.5]');
  35. height: theme('spacing.[2.5]');
  36. @media (forced-colors: active) {
  37. border: 3px solid transparent;
  38. box-sizing: content-box;
  39. }
  40. &--count {
  41. color: theme('colors.surface-menus');
  42. text-align: center;
  43. font-size: 0.625rem;
  44. font-weight: theme('fontWeight.bold');
  45. min-width: theme('spacing.[3.5]');
  46. height: theme('spacing.[3.5]');
  47. line-height: theme('lineHeight.tight');
  48. @media (prefers-reduced-motion: no-preference) {
  49. animation: pulse-warning 5s 5;
  50. }
  51. }
  52. }