alerts.less 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // Alerts
  3. // --------------------------------------------------
  4. .misago-alert-close(@text, @bg) {
  5. background-color: @bg;
  6. box-shadow: 0px 0px 0px 2px fadeOut(@text, 25%);
  7. .opacity(1);
  8. color: fadeOut(@text, 10%);
  9. &:hover {
  10. background-color: @text;
  11. box-shadow: 0px 0px 0px 2px @text;
  12. color: darken(@bg, 35%);
  13. }
  14. &:active, &:focus {
  15. background-color: darken(@bg, 15%);
  16. outline: none;
  17. color: @text;
  18. }
  19. }
  20. .misago-alerts {
  21. text-align: center;
  22. .alert {
  23. border: none;
  24. display: inline-block;
  25. margin-left: auto;
  26. margin-right: auto;
  27. .alert-icon {
  28. margin: -@alert-padding 0px;
  29. margin-right: @alert-padding / 2;
  30. position: relative;
  31. top: @font-size-large / 4;
  32. font-size: @font-size-large * 1.5;
  33. }
  34. .close {
  35. border-radius: @border-radius-small;
  36. float: none;
  37. margin-left: @alert-padding;
  38. padding: 6px 8px;
  39. font-size: @font-size-small;
  40. text-shadow: none;
  41. }
  42. &.alert-success {
  43. .close {
  44. .misago-alert-close(@alert-success-text, @alert-success-bg);
  45. }
  46. }
  47. &.alert-info {
  48. .close {
  49. .misago-alert-close(@alert-info-text, @alert-info-bg);
  50. }
  51. }
  52. &.alert-warning {
  53. .close {
  54. .misago-alert-close(@alert-warning-text, @alert-warning-bg);
  55. }
  56. }
  57. &.alert-danger {
  58. .close {
  59. .misago-alert-close(@alert-danger-text, @alert-danger-bg);
  60. }
  61. }
  62. }
  63. &.alerts-fixed {
  64. position: fixed;
  65. top: 0;
  66. z-index: @zindex-modal + 1;
  67. overflow: visible;
  68. width: 100%;
  69. &>div {
  70. width: 100%;
  71. overflow: hidden;
  72. .alert {
  73. box-shadow: 0px 0px 0px 6px fadeOut(#000, 85%);
  74. border-radius: 0px;
  75. display: block;
  76. padding: @line-height-computed 0px;
  77. font-size: @font-size-large;
  78. .alert-icon {
  79. position: relative;
  80. top: (@font-size-large - @font-size-base) / 2;
  81. }
  82. }
  83. }
  84. }
  85. }