2
0

_messages.scss 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. //
  4. // For inline help text, see typography.scss
  5. .messages {
  6. position: relative;
  7. z-index: 5;
  8. background-color: $color-grey-1;
  9. .buttons {
  10. margin-left: 1em;
  11. }
  12. > ul {
  13. @include unlistimmediate();
  14. position: relative;
  15. top: -100px;
  16. opacity: 0;
  17. }
  18. > ul > li {
  19. // @include nice-padding;
  20. padding: 1.6em 3em 1.6em 1.6em;
  21. color: $color-white;
  22. }
  23. > ul > li:before {
  24. @include font-smoothing;
  25. margin-right: 0.5em;
  26. font-size: 1.5em;
  27. vertical-align: middle;
  28. }
  29. &-icon {
  30. vertical-align: text-top;
  31. margin-right: 0.5em;
  32. width: 1.5em;
  33. height: 1.5em;
  34. }
  35. .error {
  36. background-color: $color-red-dark;
  37. }
  38. .warning {
  39. background-color: $color-orange-dark;
  40. }
  41. .success {
  42. background-color: $color-green-dark;
  43. }
  44. .success .button:hover {
  45. background-color: $color-teal-dark;
  46. }
  47. .button-secondary {
  48. border-color: rgba(255, 255, 255, 0.5);
  49. color: $color-white;
  50. &:hover {
  51. border-color: transparent;
  52. }
  53. }
  54. .errorlist {
  55. margin: 0.5em 0 0 1em;
  56. }
  57. }
  58. .messages.new > ul {
  59. transition: none;
  60. top: -100px;
  61. }
  62. .ready .messages > ul,
  63. .messages.appear > ul {
  64. transition: top 0.5s ease, opacity 0.5s ease, max-height 1.2s ease;
  65. opacity: 1;
  66. top: 0;
  67. }
  68. @include media-breakpoint-up(sm) {
  69. .messages > ul > li {
  70. padding-left: 1.6em;
  71. padding-right: 3em;
  72. }
  73. }