notifications.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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-icon.notification-icon-center {
  61. padding-top: 0;
  62. display: flex;
  63. align-items: center;
  64. }
  65. .notification-content-and-cta {
  66. // shared container to align cta with text on smaller screens
  67. display: flex;
  68. flex-grow: 1;
  69. flex-wrap: wrap;
  70. p:last-child {
  71. margin-bottom: 0;
  72. }
  73. }
  74. .notification-content {
  75. flex-grow: 1;
  76. padding: $spacing-06 0;
  77. width: 100%;
  78. }
  79. .notification-cta {
  80. padding-bottom: $spacing-06;
  81. a {
  82. font-weight: 700;
  83. }
  84. a,
  85. button {
  86. white-space: nowrap;
  87. }
  88. }
  89. .notification-disclaimer {
  90. color: var(--neutral-60);
  91. font-size: $font-size-sm;
  92. padding-bottom: $spacing-06;
  93. }
  94. .notification-close-btn {
  95. height: $spacing-12;
  96. align-items: center;
  97. display: flex;
  98. padding: 0 0 0 $spacing-06;
  99. button {
  100. aspect-ratio: 1;
  101. border-radius: 50%;
  102. display: flex;
  103. float: right;
  104. padding: 5.5px;
  105. cursor: pointer;
  106. background: transparent;
  107. border: 0;
  108. &:hover,
  109. &:focus {
  110. background-color: rgba($neutral-90, 0.08);
  111. color: var(--content-secondary);
  112. }
  113. }
  114. }
  115. &.notification-type-info {
  116. background-color: var(--bg-info-03);
  117. border: 1px solid var(--blue-20);
  118. .notification-icon {
  119. color: var(--blue-50);
  120. }
  121. }
  122. &.notification-type-success {
  123. background-color: var(--bg-accent-03);
  124. border: 1px solid var(--green-20);
  125. .notification-icon {
  126. color: var(--green-50);
  127. }
  128. }
  129. &.notification-type-warning {
  130. background-color: var(--bg-warning-03);
  131. border: 1px solid var(--yellow-20);
  132. .notification-icon {
  133. color: var(--yellow-40);
  134. }
  135. }
  136. &.notification-type-error {
  137. background-color: var(--bg-danger-03);
  138. border: 1px solid var(--red-20);
  139. .notification-icon {
  140. color: var(--red-50);
  141. }
  142. }
  143. &.notification-type-offer {
  144. background-color: var(--bg-light-primary);
  145. border: 1px solid var(--neutral-20);
  146. .notification-icon {
  147. color: var(--neutral-50);
  148. }
  149. }
  150. @include media-breakpoint-up(md) {
  151. &:not(.notification-cta-below-content) {
  152. .notification-content-and-cta {
  153. flex-wrap: nowrap;
  154. }
  155. .notification-content {
  156. width: auto;
  157. }
  158. .notification-cta {
  159. height: $spacing-12;
  160. padding-left: $spacing-06;
  161. padding-bottom: 0;
  162. align-items: center;
  163. display: flex;
  164. }
  165. }
  166. }
  167. }
  168. .notification-with-scroll-margin {
  169. scroll-margin: $spacing-06;
  170. }
  171. .notification-list {
  172. .notification {
  173. margin-bottom: $spacing-07;
  174. }
  175. }
  176. // Reconfirmation notification
  177. .reconfirm-notification {
  178. display: flex;
  179. width: 100%;
  180. .fa-warning {
  181. margin-right: $spacing-05;
  182. }
  183. .btn-reconfirm {
  184. float: right;
  185. margin-left: $spacing-05;
  186. text-transform: capitalize;
  187. }
  188. }
  189. .group-invitation-cancel-subscription-notification-buttons {
  190. display: flex;
  191. align-items: center;
  192. }
  193. // Settings page
  194. .affiliations-table {
  195. .reconfirm-notification {
  196. margin: 0 auto $spacing-05 auto !important;
  197. padding: $spacing-07;
  198. }
  199. .reconfirm-row {
  200. td {
  201. border: 0;
  202. .alert {
  203. border: 0;
  204. padding: 0;
  205. }
  206. :not(.alert) {
  207. .reconfirm-notification {
  208. background-color: var(--neutral-10);
  209. border-radius: $border-radius-base;
  210. .fa-warning {
  211. color: var(--yellow-40);
  212. }
  213. }
  214. }
  215. }
  216. }
  217. }
  218. // Only apply bottom margin to form messages when it is non-empty
  219. .form-messages-bottom-margin > :last-child {
  220. margin-bottom: var(--spacing-06);
  221. }