lungo.widgets.notification.less 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. @import "mixins.less";
  2. @import "constants.less";
  3. @notification_opacity: rgba(0,0,0,0.3);
  4. @defaultTrasition : @easeOutSine;
  5. @keyframe: 300ms;
  6. @modal_opacity: rgba(0,0,0,0.8);
  7. @modal_size: 114px;
  8. @modal_size_middle: 64px;
  9. @modal_border_radius: 1px;
  10. @notify_font_color: #555;
  11. @notify_font_shadow: 0 1px 0px #fff;
  12. @font_color: #fff;
  13. .notification {
  14. position: absolute;
  15. width: 100%;
  16. height: 100%;
  17. z-index: 3;
  18. background: none;
  19. font-size: 0.9em;
  20. color: @font_color;
  21. display: none;
  22. &.modal { background-color: @notification_opacity; }
  23. & .window {
  24. position: relative;
  25. opacity: 0;
  26. //transition-property: -webkit-transform, transform, opacity;
  27. // @TODO: Correct vendor property;
  28. .transition(all @keyframe @defaultTrasition);
  29. &.show {
  30. opacity: 1;
  31. // .transition(all @keyframe @defaultTrasition);
  32. }
  33. &:not(.special) {
  34. left: 50%;
  35. top: 50%;
  36. width: @modal_size;
  37. margin: -@modal_size_middle auto auto -@modal_size_middle;
  38. padding: 8px;
  39. background-color: @modal_opacity;
  40. text-align: center;
  41. .border-radius(@modal_border_radius);
  42. // .transform(translate3d(0, 100%, 0));
  43. .transform(scale(0.85));
  44. &.show {
  45. .transform(translate3d(0, 0%, 0));
  46. }
  47. & .icon {
  48. display: block;
  49. font-size: 5.0em;
  50. &.loading {
  51. // margin: 24px auto;
  52. margin-top: 24px;
  53. margin-bottom: 24px;
  54. }
  55. }
  56. & strong {
  57. display: block;
  58. margin-bottom: 4px;
  59. }
  60. }
  61. &.confirm, &.notify {
  62. .transform(translate3d(0, -150%, 0));
  63. &.show { .transform(translate3d(0, 0%, 0)); }
  64. & .icon {
  65. float: left;
  66. font-size: 2.5em;
  67. margin-right: 8px;
  68. }
  69. & strong {
  70. line-height: 1.5em;
  71. }
  72. }
  73. &.confirm {
  74. opacity: 1;
  75. padding: 10px 12px;
  76. top: 0;
  77. top: 42px;
  78. background: #333;
  79. & hr {
  80. margin: 10px 0;
  81. height: 1px;
  82. background: rgba(0,0,0,0.75);
  83. .box-shadow(0 1px 0 rgba(255,255,255,0.25));
  84. }
  85. & .button {
  86. width: 42%;
  87. font-size: 15px;
  88. line-height: 40px;
  89. &:last-child {float: right;}
  90. }
  91. }
  92. &.notify {
  93. padding: 3px 0px 7px 7px;
  94. top: 0;
  95. color: @notify_font_color;
  96. text-shadow: @notify_font_shadow;
  97. .box-shadow(0px 1px 3px rgba(0,0,0,0.5));
  98. &.error, &.alert, &.success {
  99. color: @font_color;
  100. text-shadow: 0 1px 0px rgba(0,0,0,0.1);
  101. }
  102. &.error { .linear-gradient(top, ~','@red 0%, ~','@red-active 85%); }
  103. &.alert { .linear-gradient(top, ~','@yellow 0%, ~','@yellow-active 85%); }
  104. &.success { .linear-gradient(top, ~','@green 0%, ~','@green-active 85%); }
  105. }
  106. &.url {
  107. left: 0%;
  108. top: 00%;
  109. width: 280px;
  110. height: auto;
  111. margin: 64px auto 0px;
  112. padding: 0px;
  113. .transform(translate3d(0, 75%, 0));
  114. & .close {
  115. position: absolute;
  116. top: -14px;
  117. right: -14px;
  118. font-size: 14px;
  119. line-height: 24px;
  120. font-weight: normal;
  121. width: 24px;
  122. height: 24px;
  123. background: #000;
  124. border-radius: 14px;
  125. border: solid 2px #fff;
  126. box-shadow: 0 0 4px black;
  127. }
  128. }
  129. }
  130. }
  131. .notification .window.working span{
  132. -webkit-animation: notification-working 1s infinite;
  133. }
  134. @-webkit-keyframes notification-working {
  135. 0% {opacity: 1;}
  136. 50% {opacity: 0;}
  137. 100% {opacity: 1;}
  138. }