Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_notices.scss 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. $snackbar-background-color: $dark !default;
  2. $snackbar-color: $dark-invert !default;
  3. .notices {
  4. position: fixed;
  5. display: flex;
  6. top: 0;
  7. bottom: 0;
  8. left: 0;
  9. right: 0;
  10. padding: 2em;
  11. overflow: hidden;
  12. z-index: 1000;
  13. pointer-events: none;
  14. .toast {
  15. display: inline-flex;
  16. animation-duration: $speed-slow;
  17. margin: 0.5em 0;
  18. text-align: center;
  19. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  20. border-radius: 2em;
  21. padding: 0.75em 1.5em;
  22. pointer-events: auto;
  23. opacity: 0.92;
  24. @each $name, $pair in $colors {
  25. $color: nth($pair, 1);
  26. $color-invert: nth($pair, 2);
  27. &.is-#{$name} {
  28. color: $color-invert;
  29. background: $color;
  30. }
  31. }
  32. }
  33. .snackbar {
  34. display: inline-flex;
  35. align-items: center;
  36. justify-content: space-around;
  37. animation-duration: $speed-slow;
  38. margin: 0.5em 0;
  39. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  40. border-radius: $radius;
  41. pointer-events: auto;
  42. background: $snackbar-background-color;
  43. color: $snackbar-color;
  44. min-height: 3em;
  45. .text {
  46. padding: 0.5em 1em;
  47. }
  48. .action {
  49. margin-left: auto;
  50. padding: 0.5em;
  51. padding-left: 0;
  52. .button {
  53. font-weight: $weight-semibold;
  54. text-transform: uppercase;
  55. background: $snackbar-background-color;
  56. border: transparent;
  57. }
  58. .button:hover {
  59. background: darken($snackbar-background-color, 5%);
  60. }
  61. .button:active {
  62. background: darken($snackbar-background-color, 5%);
  63. }
  64. @each $name, $pair in $colors {
  65. $color: nth($pair, 1);
  66. &.is-#{$name} {
  67. .button {
  68. color: $color;
  69. }
  70. }
  71. }
  72. }
  73. @include mobile {
  74. width: 100%;
  75. margin: 0;
  76. border-radius: 0;
  77. }
  78. @include tablet {
  79. min-width: 350px;
  80. max-width: 600px;
  81. overflow: hidden;
  82. }
  83. }
  84. .notification {
  85. max-width: 600px;
  86. }
  87. .toast,
  88. .snackbar,
  89. .notification {
  90. // Modifiers
  91. &.is-top, &.is-bottom {
  92. align-self: center;
  93. }
  94. &.is-top-right, &.is-bottom-right {
  95. align-self: flex-end;
  96. }
  97. &.is-top-left, &.is-bottom-left {
  98. align-self: flex-start;
  99. }
  100. &.is-toast {
  101. opacity: 0.92;
  102. }
  103. }
  104. // Modifiers
  105. &.is-top {
  106. flex-direction: column;
  107. }
  108. &.is-bottom {
  109. flex-direction: column-reverse;
  110. }
  111. &.has-custom-container {
  112. position: absolute;
  113. }
  114. @include mobile {
  115. padding: 0;
  116. position: fixed !important;
  117. }
  118. }