_toast.scss 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .#{$rt-namespace}__toast {
  2. position: relative;
  3. min-height: var(--toastify-toast-min-height);
  4. box-sizing: border-box;
  5. margin-bottom: 1rem;
  6. padding: 8px;
  7. border-radius: 4px;
  8. box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
  9. display: flex;
  10. justify-content: space-between;
  11. max-height: var(--toastify-toast-max-height);
  12. overflow: hidden;
  13. font-family: var(--toastify-font-family);
  14. cursor: default;
  15. direction: ltr;
  16. /* webkit only issue #791 */
  17. z-index: 0;
  18. &--rtl {
  19. direction: rtl;
  20. }
  21. &--close-on-click {
  22. cursor: pointer;
  23. }
  24. &-body {
  25. margin: auto 0;
  26. flex: 1 1 auto;
  27. padding: 6px;
  28. display: flex;
  29. align-items: center;
  30. & > div:last-child {
  31. word-break: break-word;
  32. flex: 1;
  33. }
  34. }
  35. &-icon {
  36. margin-inline-end: 10px;
  37. width: 20px;
  38. flex-shrink: 0;
  39. display: flex;
  40. }
  41. }
  42. .#{$rt-namespace}--animate {
  43. animation-fill-mode: both;
  44. animation-duration: 0.7s;
  45. }
  46. .#{$rt-namespace}--animate-icon {
  47. animation-fill-mode: both;
  48. animation-duration: 0.3s;
  49. }
  50. @media #{$rt-mobile} {
  51. .#{$rt-namespace}__toast {
  52. margin-bottom: 0;
  53. border-radius: 0;
  54. }
  55. }