notifications.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. .notification-body {
  2. // will be deprecated once notifications moved to use .notification (see below)
  3. flex-grow: 1;
  4. width: 90%;
  5. @include media-breakpoint-up(md) {
  6. width: auto;
  7. }
  8. }
  9. .notification-action {
  10. $line-height-computed: $font-size-base * $line-height-base; // 24px
  11. // will be deprecated once notifications moved to use .notification (see below)
  12. margin-top: calc($line-height-computed / 2); // match paragraph padding
  13. order: 1;
  14. @include media-breakpoint-up(md) {
  15. margin-top: 0;
  16. order: 0;
  17. padding-left: $spacing-05;
  18. }
  19. }
  20. .notification-close {
  21. // will be deprecated once notifications moved to use .notification (see below)
  22. padding-left: $spacing-05;
  23. text-align: right;
  24. width: 10%;
  25. button {
  26. aspect-ratio: 1;
  27. border-radius: 50%;
  28. display: flex;
  29. float: right;
  30. padding: 5.5px;
  31. cursor: pointer;
  32. background: transparent;
  33. border: 0;
  34. &:hover,
  35. &:focus {
  36. background-color: rgba($neutral-90, 0.08);
  37. color: var(--content-secondary);
  38. }
  39. }
  40. @include media-breakpoint-up(md) {
  41. width: auto;
  42. }
  43. }
  44. .notification {
  45. border-radius: $border-radius-base;
  46. color: var(--content-primary);
  47. display: flex;
  48. padding: 0 $spacing-06; // vertical padding added by elements within notification
  49. width: 100%;
  50. a:not(.btn) {
  51. text-decoration: underline;
  52. }
  53. p {
  54. margin-bottom: $spacing-02;
  55. }
  56. .notification-icon {
  57. flex-grow: 0;
  58. padding: 18px $spacing-06 0 0;
  59. }
  60. .notification-content-and-cta {
  61. // shared container to align cta with text on smaller screens
  62. display: flex;
  63. flex-grow: 1;
  64. flex-wrap: wrap;
  65. p:last-child {
  66. margin-bottom: 0;
  67. }
  68. }
  69. .notification-content {
  70. flex-grow: 1;
  71. padding: $spacing-06 0;
  72. width: 100%;
  73. }
  74. .notification-cta {
  75. padding-bottom: $spacing-06;
  76. a {
  77. font-weight: 700;
  78. }
  79. a,
  80. button {
  81. white-space: nowrap;
  82. }
  83. }
  84. .notification-disclaimer {
  85. color: var(--neutral-60);
  86. font-size: $font-size-sm;
  87. padding-bottom: $spacing-06;
  88. }
  89. .notification-close-btn {
  90. height: $spacing-12;
  91. align-items: center;
  92. display: flex;
  93. padding: 0 0 0 $spacing-06;
  94. button {
  95. aspect-ratio: 1;
  96. border-radius: 50%;
  97. display: flex;
  98. float: right;
  99. padding: 5.5px;
  100. cursor: pointer;
  101. background: transparent;
  102. border: 0;
  103. &:hover,
  104. &:focus {
  105. background-color: rgba($neutral-90, 0.08);
  106. color: var(--content-secondary);
  107. }
  108. }
  109. }
  110. &.notification-type-info {
  111. background-color: var(--bg-info-03);
  112. border: 1px solid var(--blue-20);
  113. .notification-icon {
  114. color: var(--blue-50);
  115. }
  116. }
  117. &.notification-type-success {
  118. background-color: var(--bg-accent-03);
  119. border: 1px solid var(--green-20);
  120. .notification-icon {
  121. color: var(--green-50);
  122. }
  123. }
  124. &.notification-type-warning {
  125. background-color: var(--bg-warning-03);
  126. border: 1px solid var(--yellow-20);
  127. .notification-icon {
  128. color: var(--yellow-40);
  129. }
  130. }
  131. &.notification-type-error {
  132. background-color: var(--bg-danger-03);
  133. border: 1px solid var(--red-20);
  134. .notification-icon {
  135. color: var(--red-50);
  136. }
  137. }
  138. &.notification-type-offer {
  139. background-color: var(--bg-light-primary);
  140. border: 1px solid var(--neutral-20);
  141. .notification-icon {
  142. color: var(--neutral-50);
  143. }
  144. }
  145. @include media-breakpoint-up(md) {
  146. &:not(.notification-cta-below-content) {
  147. .notification-content-and-cta {
  148. flex-wrap: nowrap;
  149. }
  150. .notification-content {
  151. width: auto;
  152. }
  153. .notification-cta {
  154. height: $spacing-12;
  155. padding-left: $spacing-06;
  156. padding-bottom: 0;
  157. align-items: center;
  158. display: flex;
  159. }
  160. }
  161. }
  162. }
  163. .notification-with-scroll-margin {
  164. scroll-margin: $spacing-06;
  165. }
  166. .notification-list {
  167. .notification {
  168. margin-bottom: $spacing-07;
  169. }
  170. }
  171. // Reconfirmation notification
  172. .reconfirm-notification {
  173. display: flex;
  174. width: 100%;
  175. .fa-warning {
  176. margin-right: $spacing-05;
  177. }
  178. .btn-reconfirm {
  179. float: right;
  180. margin-left: $spacing-05;
  181. text-transform: capitalize;
  182. }
  183. }
  184. .group-invitation-cancel-subscription-notification-buttons {
  185. display: flex;
  186. align-items: center;
  187. }
  188. // Settings page
  189. .affiliations-table {
  190. .reconfirm-notification {
  191. margin: 0 auto $spacing-05 auto !important;
  192. padding: $spacing-07;
  193. }
  194. .reconfirm-row {
  195. td {
  196. border: 0;
  197. .alert {
  198. border: 0;
  199. padding: 0;
  200. }
  201. :not(.alert) {
  202. .reconfirm-notification {
  203. background-color: var(--neutral-10);
  204. border-radius: $border-radius-base;
  205. .fa-warning {
  206. color: var(--yellow-40);
  207. }
  208. }
  209. }
  210. }
  211. }
  212. }