flash-message.less 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // Flash Message
  3. // --------------------------------------------------
  4. .flash-message-style(@color-bg, @color-border, @color-text) {
  5. background: @color-bg;
  6. border: 1px solid @color-border;
  7. border-top: none;
  8. .box-shadow(0px 2px 3px fadeOut(@gray-darker, 70%));
  9. padding: @alert-padding;
  10. color: @color-text;
  11. .fa {
  12. margin-right: @font-size-base / 2;
  13. }
  14. }
  15. .flash-message {
  16. position: fixed;
  17. top: -100%;
  18. width: 100%;
  19. z-index: @zindex-modal + 10;
  20. text-align: center;
  21. font-size: @font-size-large;
  22. transition: top 300ms ease;
  23. &.visible {
  24. top: 0px;
  25. transition: top 200ms ease;
  26. }
  27. .message-success {
  28. .flash-message-style(@alert-success-bg, @alert-success-border, @alert-success-text);
  29. }
  30. .message-info {
  31. .flash-message-style(@alert-info-bg, @alert-info-border, @alert-info-text);
  32. }
  33. .message-warning {
  34. .flash-message-style(@alert-warning-bg, @alert-warning-border, @alert-warning-text);
  35. }
  36. .message-danger {
  37. .flash-message-style(@alert-danger-bg, @alert-danger-border, @alert-danger-text);
  38. }
  39. /* Small devices (tablets, 768px and up) */
  40. @media (min-width: @screen-sm-min) {
  41. padding: 0px @padding-large-horizontal;
  42. pointer-events: none;
  43. p {
  44. border-left: none;
  45. border-right: none;
  46. border-radius: 0px 0px @alert-border-radius @alert-border-radius;
  47. display: inline-block;
  48. padding: @padding-large-vertical @padding-large-horizontal;
  49. font-size: @font-size-base;
  50. }
  51. }
  52. }