_messages.scss 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // Messages are specific to Django's 'Messaging' system which adds messages into the session,
  2. // for display on the next page visited. These appear as an animated banner at the top of the page.
  3. // For inline help text, see typography.scss
  4. .messages {
  5. position: relative;
  6. background-color: $color-grey-1;
  7. .buttons {
  8. margin-inline-start: 1em;
  9. }
  10. > ul {
  11. @include unlistimmediate();
  12. position: relative;
  13. top: -100px;
  14. opacity: 0;
  15. }
  16. > ul > li {
  17. // @include nice-padding;
  18. padding: 1.6em 3em 1.6em 1.6em;
  19. color: $color-white;
  20. }
  21. > ul > li:before {
  22. @include font-smoothing;
  23. margin-inline-end: 0.5em;
  24. font-size: 1.5em;
  25. vertical-align: middle;
  26. }
  27. &-icon {
  28. vertical-align: text-top;
  29. margin-inline-end: 0.5em;
  30. width: 1.5em;
  31. height: 1.5em;
  32. }
  33. .error {
  34. background-color: $color-red-dark;
  35. }
  36. .warning {
  37. background-color: $color-orange-dark;
  38. }
  39. .success {
  40. background-color: $color-green-dark;
  41. }
  42. .success .button:hover {
  43. background-color: $color-teal-dark;
  44. }
  45. .button-secondary {
  46. border-color: rgba(255, 255, 255, 0.5);
  47. color: $color-white;
  48. &:hover {
  49. border-color: transparent;
  50. }
  51. }
  52. .errorlist {
  53. margin: 0.5em 0 0 1em;
  54. }
  55. }
  56. .messages.new > ul {
  57. transition: none;
  58. top: -100px;
  59. }
  60. .ready .messages > ul,
  61. .messages.appear > ul {
  62. transition: top 0.5s ease, opacity 0.5s ease, max-height 1.2s ease;
  63. opacity: 1;
  64. top: 0;
  65. }
  66. @include media-breakpoint-up(sm) {
  67. .messages > ul > li {
  68. padding-inline-start: 1.6em;
  69. padding-inline-end: 3em;
  70. }
  71. }