notification.css 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* Snackbar - Toast */
  2. .snackbar,
  3. .toast {
  4. box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.23), 0px 3px 10px rgba(0, 0, 0, 0.16);
  5. position: fixed;
  6. z-index: 4;
  7. min-height: 6rem;
  8. max-height: 11rem;
  9. height: auto;
  10. color: white;
  11. padding: 2rem 3rem;
  12. box-sizing: border-box;
  13. width: 40rem;
  14. pointer-events: none;
  15. transition: opacity 0.2s ease, bottom 0.4s ease;
  16. transform: translateX(0);
  17. }
  18. .snackbar > a {
  19. pointer-events: auto;
  20. margin: -1rem -2rem;
  21. display: block;
  22. margin: -2rem -1rem;
  23. padding: 2rem 1rem;
  24. }
  25. .snackbar > a:hover {
  26. border: 3px solid rgba(255, 255, 255, 0.2);
  27. padding: calc(2rem - 3px) calc(1rem - 3px);
  28. }
  29. .snackbar p,
  30. .toast p {
  31. color: white;
  32. overflow: hidden;
  33. white-space: nowrap;
  34. text-overflow: ellipsis;
  35. }
  36. .snackbar {
  37. background-color: #333333;
  38. bottom: 3rem;
  39. left: 3rem;
  40. border-radius: 0.25rem;
  41. opacity: 1;
  42. padding: 2rem 1rem;
  43. }
  44. .toast {
  45. background-color: #323232;
  46. border-radius: 3rem;
  47. left: 50%;
  48. bottom: 3rem;
  49. line-height: 2.5rem;
  50. margin-left: -20rem;
  51. }
  52. .snackbar:empty,
  53. .toast:empty {
  54. opacity: 0;
  55. }
  56. .snackbar#error_websocket {
  57. max-height: initial;
  58. }
  59. .snackbar#error_websocket p {
  60. line-height: 2.5rem;
  61. white-space: initial;
  62. }
  63. .snackbar#error_websocket:not(.hide) ~ main,
  64. .snackbar#error_websocket:not(.hide) ~ nav,
  65. .snackbar#error_websocket:not(.hide) ~ div:not(.toast) {
  66. opacity: 0.5;
  67. pointer-events: none;
  68. }
  69. @media screen and (max-width: 22rem) {
  70. .snackbar {
  71. width: 100%;
  72. top: 0;
  73. left: 0;
  74. bottom: auto;
  75. border-radius: 0;
  76. }
  77. .toast {
  78. max-width: 90%;
  79. left: 5%;
  80. margin-left: 0;
  81. }
  82. }