_toastContainer.scss 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .#{$rt-namespace}__toast-container {
  2. z-index: var(--toastify-z-index);
  3. -webkit-transform: translate3d(0, 0, var(--toastify-z-index));
  4. position: fixed;
  5. padding: 4px;
  6. width: var(--toastify-toast-width);
  7. box-sizing: border-box;
  8. color: #fff;
  9. &--top-left {
  10. top: 1em;
  11. left: 1em;
  12. }
  13. &--top-center {
  14. top: 1em;
  15. left: 50%;
  16. transform: translateX(-50%);
  17. }
  18. &--top-right {
  19. top: 1em;
  20. right: 1em;
  21. }
  22. &--bottom-left {
  23. bottom: 1em;
  24. left: 1em;
  25. }
  26. &--bottom-center {
  27. bottom: 1em;
  28. left: 50%;
  29. transform: translateX(-50%);
  30. }
  31. &--bottom-right {
  32. bottom: 1em;
  33. right: 1em;
  34. }
  35. }
  36. @media #{$rt-mobile} {
  37. .#{$rt-namespace}__toast-container {
  38. width: 100vw;
  39. padding: 0;
  40. left: 0;
  41. margin: 0;
  42. &--top-left,
  43. &--top-center,
  44. &--top-right {
  45. top: 0;
  46. transform: translateX(0);
  47. }
  48. &--bottom-left,
  49. &--bottom-center,
  50. &--bottom-right {
  51. bottom: 0;
  52. transform: translateX(0);
  53. }
  54. &--rtl {
  55. right: 0;
  56. left: initial;
  57. }
  58. }
  59. }