_notifications.scss 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. // BASE
  2. // -----------------------------------------------------------------------------
  3. /* Notification */
  4. .ui-pnotify {
  5. right: 15px;
  6. top: 15px;
  7. .notification {
  8. border-radius: $border-radius;
  9. box-shadow: none;
  10. padding: 15px 15px 15px 75px;
  11. .ui-pnotify-icon {
  12. left: 0;
  13. position: absolute;
  14. top: 0;
  15. width: 75px;
  16. text-align: center;
  17. & > span {
  18. border: 2px solid #FFF;
  19. border-radius: 50%;
  20. display: inline-block;
  21. float: none;
  22. font-size: 35px;
  23. height: 50px;
  24. line-height: 48px;
  25. margin: 8px 0 0;
  26. padding: 0;
  27. width: 50px;
  28. text-align: center;
  29. }
  30. }
  31. .ui-pnotify-title {
  32. font-size: 14px;
  33. letter-spacing: 0;
  34. }
  35. .ui-pnotify-text {
  36. font-size: 12px;
  37. line-height: 1.3em;
  38. }
  39. }
  40. }
  41. // TIMES FIX
  42. // -----------------------------------------------------------------------------
  43. .ui-pnotify {
  44. .notification.notification-danger {
  45. .ui-pnotify-icon {
  46. & > span.fa-times {
  47. line-height: 47px;
  48. }
  49. }
  50. }
  51. }
  52. // SHADOWED
  53. // -----------------------------------------------------------------------------
  54. .ui-pnotify {
  55. .ui-pnotify-shadow {
  56. box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.4);
  57. }
  58. }
  59. // WITHOUT ICON
  60. // -----------------------------------------------------------------------------
  61. .ui-pnotify.ui-pnotify-no-icon {
  62. .notification {
  63. padding-left: 15px;
  64. }
  65. }
  66. // WITHOUT BORDER RADIOUS
  67. // -----------------------------------------------------------------------------
  68. .ui-pnotify {
  69. .ui-pnotify-sharp {
  70. border-radius: 0;
  71. }
  72. }
  73. // ICON WITHOUT BORDER
  74. // -----------------------------------------------------------------------------
  75. body {
  76. .ui-pnotify.icon-nb {
  77. .notification {
  78. .ui-pnotify-icon {
  79. & > span {
  80. border-color: transparent;
  81. border-radius: 0;
  82. }
  83. }
  84. }
  85. }
  86. }
  87. // STACK BAR TOP
  88. // -----------------------------------------------------------------------------
  89. .ui-pnotify.stack-bar-top {
  90. right: 0;
  91. top: 0;
  92. .notification {
  93. border-radius: 0;
  94. .ui-pnotify-icon {
  95. & > span {
  96. margin-top: 7px;
  97. }
  98. }
  99. }
  100. }
  101. // STACK BAR BOTTOM
  102. // -----------------------------------------------------------------------------
  103. .ui-pnotify.stack-bar-bottom {
  104. bottom: 0;
  105. left: auto;
  106. margin-left: 15%;
  107. right: auto;
  108. top: auto;
  109. .notification {
  110. border-radius: 0;
  111. .ui-pnotify-icon {
  112. & > span {
  113. margin-top: 9px;
  114. }
  115. }
  116. }
  117. }
  118. // CLICK 2 CLOSE
  119. // -----------------------------------------------------------------------------
  120. .ui-pnotify.click-2-close {
  121. cursor: pointer;
  122. }
  123. // STATES
  124. // -----------------------------------------------------------------------------
  125. /* Notification States */
  126. @each $state in $states {
  127. .ui-pnotify {
  128. .notification-#{nth($state,1)} {
  129. background: rgba(nth($state,2), 0.95);
  130. color: rgba(nth($state,3), 0.7);
  131. .ui-pnotify-icon > span {
  132. border-color: rgba(nth($state,3), 0.7);
  133. }
  134. }
  135. &.stack-bar-top,
  136. &.stack-bar-bottom {
  137. .notification-#{nth($state,1)} {
  138. background: nth($state,2);
  139. }
  140. }
  141. }
  142. .ui-pnotify.notification-#{nth($state,1)} {
  143. .notification,
  144. .notification-#{nth($state,1)} {
  145. background: rgba(nth($state,2), 0.95);
  146. color: rgba(nth($state,3), 0.7);
  147. .ui-pnotify-icon > span {
  148. border-color: rgba(nth($state,3), 0.7);
  149. }
  150. }
  151. &.stack-bar-top,
  152. &.stack-bar-bottom {
  153. .notification,
  154. .notification-#{nth($state,1)} {
  155. background: nth($state,2);
  156. }
  157. }
  158. }
  159. }
  160. // RESPONSIVE
  161. // -----------------------------------------------------------------------------
  162. /* Notification Responsive */
  163. @media only screen and (max-width: 767px) {
  164. html > body > .ui-pnotify {
  165. bottom: auto !important;
  166. left: 0 !important;
  167. margin: 0 !important;
  168. right: 0 !important;
  169. top: $header-height !important;
  170. width: auto !important;
  171. .notification {
  172. border-radius: 0 !important;
  173. height: auto !important;
  174. position: static !important;
  175. width: 100%;
  176. .ui-pnotify-title,
  177. .ui-pnotify-text {
  178. padding-right: 35px !important;
  179. }
  180. .ui-pnotify-sticker {
  181. display: none !important;
  182. }
  183. .ui-pnotify-closer {
  184. display: block !important;
  185. font-size: 24px !important;
  186. visibility: visible !important;
  187. }
  188. }
  189. }
  190. }