_messages.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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: theme('colors.surface-page');
  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: theme('colors.text-button');
  20. border-bottom: 1px solid transparent;
  21. }
  22. > ul > li:before {
  23. @include font-smoothing;
  24. margin-inline-end: 0.5em;
  25. font-size: 1.5em;
  26. vertical-align: middle;
  27. }
  28. &-icon {
  29. vertical-align: text-top;
  30. margin-inline-end: 0.5em;
  31. width: 1.5em;
  32. height: 1.5em;
  33. }
  34. .button.button-secondary {
  35. border-color: currentColor;
  36. color: inherit;
  37. &:hover {
  38. background-color: transparent;
  39. color: theme('colors.text-button');
  40. }
  41. }
  42. .error {
  43. background-color: theme('colors.critical.200');
  44. color: theme('colors.white.DEFAULT');
  45. .button:hover {
  46. color: theme('colors.white.DEFAULT');
  47. }
  48. }
  49. .warning {
  50. background-color: theme('colors.warning.100');
  51. color: theme('colors.grey.600');
  52. }
  53. .info {
  54. background-color: theme('colors.info.100');
  55. color: theme('colors.white.DEFAULT');
  56. }
  57. .success {
  58. background-color: theme('colors.positive.100');
  59. color: theme('colors.white.DEFAULT');
  60. }
  61. .errorlist {
  62. margin: 0.5em 0 0 1em;
  63. }
  64. }
  65. .messages.new > ul {
  66. transition: none;
  67. top: -100px;
  68. }
  69. .ready .messages > ul,
  70. .messages.appear > ul {
  71. transition:
  72. top 0.5s ease,
  73. opacity 0.5s ease,
  74. max-height 1.2s ease;
  75. opacity: 1;
  76. top: 0;
  77. }
  78. @include media-breakpoint-up(sm) {
  79. .messages > ul > li {
  80. padding-inline-start: 1.6em;
  81. padding-inline-end: 3em;
  82. }
  83. }