notifications.scss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. .notification-body {
  2. // will be deprecated once notifications moved to use .notification (see below)
  3. flex-grow: 1;
  4. width: 90%;
  5. @media (min-width: var(--bs-breakpoint-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. @media (min-width: var(--bs-breakpoint-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(var(--neutral-90), 0.08);
  37. color: var(--content-secondary);
  38. }
  39. }
  40. @media (min-width: var(--bs-breakpoint-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. }
  94. .notification-close-btn {
  95. padding: 0 0 0 $spacing-06;
  96. button {
  97. aspect-ratio: 1;
  98. border-radius: 50%;
  99. display: flex;
  100. float: right;
  101. padding: 5.5px;
  102. cursor: pointer;
  103. background: transparent;
  104. border: 0;
  105. &:hover,
  106. &:focus {
  107. background-color: rgba(var(--neutral-90), 0.08);
  108. color: var(--content-secondary);
  109. }
  110. }
  111. }
  112. &.notification-type-info {
  113. background-color: var(--bg-info-03);
  114. border: 1px solid var(--blue-20);
  115. .notification-icon {
  116. color: var(--blue-50);
  117. }
  118. }
  119. &.notification-type-success {
  120. background-color: var(--bg-accent-03);
  121. border: 1px solid var(--green-20);
  122. .notification-icon {
  123. color: var(--green-50);
  124. }
  125. }
  126. &.notification-type-warning {
  127. background-color: var(--bg-warning-03);
  128. border: 1px solid var(--yellow-20);
  129. .notification-icon {
  130. color: var(--yellow-40);
  131. }
  132. }
  133. &.notification-type-error {
  134. background-color: var(--bg-danger-03);
  135. border: 1px solid var(--red-20);
  136. .notification-icon {
  137. color: var(--red-50);
  138. }
  139. }
  140. &.notification-type-offer {
  141. background-color: var(--bg-light-primary);
  142. border: 1px solid var(--neutral-20);
  143. .notification-icon {
  144. color: var(--neutral-50);
  145. }
  146. }
  147. @media (min-width: var(--bs-breakpoint-md)) {
  148. &:not(.notification-cta-below-content) {
  149. .notification-content-and-cta {
  150. flex-wrap: nowrap;
  151. }
  152. .notification-content {
  153. width: auto;
  154. }
  155. .notification-cta {
  156. height: $spacing-12;
  157. padding-left: $spacing-06;
  158. padding-bottom: 0;
  159. align-items: center;
  160. display: flex;
  161. }
  162. }
  163. }
  164. }
  165. .notification-with-scroll-margin {
  166. scroll-margin: $spacing-06;
  167. }
  168. .notification-list {
  169. .notification {
  170. margin-bottom: $spacing-07;
  171. }
  172. }
  173. // Reconfirmation notification
  174. .reconfirm-notification {
  175. display: flex;
  176. width: 100%;
  177. .fa-warning {
  178. margin-right: $spacing-05;
  179. }
  180. .btn-reconfirm {
  181. float: right;
  182. margin-left: $spacing-05;
  183. text-transform: capitalize;
  184. }
  185. }
  186. .group-invitation-cancel-subscription-notification-buttons {
  187. display: flex;
  188. align-items: center;
  189. }
  190. // Settings page
  191. .affiliations-table {
  192. .reconfirm-notification {
  193. margin: 0 auto $spacing-05 auto !important;
  194. padding: $spacing-07;
  195. }
  196. .reconfirm-row {
  197. td {
  198. border: 0;
  199. .alert {
  200. border: 0;
  201. padding: 0;
  202. }
  203. :not(.alert) {
  204. .reconfirm-notification {
  205. background-color: var(--neutral-10);
  206. border-radius: $border-radius-base;
  207. .fa-warning {
  208. color: var(--yellow-40);
  209. }
  210. }
  211. }
  212. }
  213. }
  214. }