lungo.widgets.notification.less 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. @import "constants.less";
  2. @notification_opacity: rgba(0,0,0,0.5);
  3. @defaultTrasition : @easeOutSine;
  4. @keyframe: 200ms;
  5. @modal_opacity: rgba(0,0,0,0.8);
  6. @modal_size: 104px;
  7. @modal_size_middle: 52px;
  8. .notification {
  9. position: absolute;
  10. width: 100%;
  11. height: 100%;
  12. z-index: 3;
  13. background: none;
  14. display: none;
  15. &.modal { background-color: @notification_opacity; }
  16. & .window {
  17. position: relative;
  18. opacity: 0;
  19. .transition(all @keyframe @defaultTrasition);
  20. &.show {
  21. opacity: 1;
  22. .transition-delay(@keyframe);
  23. }
  24. & strong, small {
  25. display: block;
  26. }
  27. & small {
  28. font-size: 0.7em;
  29. }
  30. &:not(.special) {
  31. left: 50%;
  32. top: 50%;
  33. width: @modal_size;
  34. margin: -@modal_size_middle auto auto -@modal_size_middle;
  35. padding: 8px;
  36. background-color: @modal_opacity;
  37. text-align: center;
  38. .transform(scale(0.8));
  39. &.show {
  40. .transform(scale(1.0));
  41. }
  42. & .icon {
  43. display: block;
  44. font-size: 4.0em;
  45. &.loading {
  46. margin-top: 24px;
  47. margin-bottom: 20px;
  48. }
  49. }
  50. & small {
  51. overflow: hidden;
  52. white-space: nowrap;
  53. text-overflow: ellipsis;
  54. }
  55. }
  56. &.confirm, &.notify {
  57. top: 0;
  58. font-size: 1.1em !important;
  59. .transform(translate3d(0, -100%, 0));
  60. &.show { .transform(translate3d(0, 0%, 0)); }
  61. & .icon {
  62. float: left;
  63. font-size: 2.0em;
  64. margin: -3px 10px 0 0;
  65. }
  66. }
  67. &.confirm {
  68. opacity: 1;
  69. padding: 10px 12px;
  70. & p { height: 44px;}
  71. & .button {
  72. width: 42%;
  73. &:last-child {float: right;}
  74. }
  75. }
  76. &.notify {
  77. padding: 8px;
  78. top: 0;
  79. }
  80. &.url {
  81. left: 0;
  82. top: 0;
  83. width: 280px;
  84. height: auto;
  85. margin: 64px auto 0px;
  86. padding: 0px;
  87. & .close {
  88. position: absolute;
  89. top: -14px;
  90. right: -14px;
  91. font-size: 14px;
  92. line-height: 24px;
  93. font-weight: normal;
  94. width: 24px;
  95. height: 24px;
  96. border-radius: 14px;
  97. }
  98. }
  99. }
  100. }
  101. .notification .window.working span{
  102. -webkit-animation: notification-working 1s infinite;
  103. }
  104. @-webkit-keyframes notification-working {
  105. 0% {opacity: 1;}
  106. 50% {opacity: 0;}
  107. 100% {opacity: 1;}
  108. }