toastr.css 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. /* based on angular-toastr css https://github.com/Foxandxss/angular-toastr/blob/cb508fe6801d6b288d3afc525bb40fee1b101650/dist/angular-toastr.css */
  2. /* position */
  3. .toast-center-center {
  4. top: 50%;
  5. left: 50%;
  6. transform: translate(-50%, -50%);
  7. }
  8. .toast-top-center {
  9. top: 0;
  10. right: 0;
  11. width: 100%;
  12. }
  13. .toast-bottom-center {
  14. bottom: 0;
  15. right: 0;
  16. width: 100%;
  17. }
  18. .toast-top-full-width {
  19. top: 0;
  20. right: 0;
  21. width: 100%;
  22. }
  23. .toast-bottom-full-width {
  24. bottom: 0;
  25. right: 0;
  26. width: 100%;
  27. }
  28. .toast-top-left {
  29. top: 12px;
  30. left: 12px;
  31. }
  32. .toast-top-right {
  33. top: 12px;
  34. right: 12px;
  35. }
  36. .toast-bottom-right {
  37. right: 12px;
  38. bottom: 12px;
  39. }
  40. .toast-bottom-left {
  41. bottom: 12px;
  42. left: 12px;
  43. }
  44. /* toast styles */
  45. .toast-title {
  46. font-weight: bold;
  47. }
  48. .toast-message {
  49. word-wrap: break-word;
  50. }
  51. .toast-message a,
  52. .toast-message label {
  53. color: #FFFFFF;
  54. }
  55. .toast-message a:hover {
  56. color: #CCCCCC;
  57. text-decoration: none;
  58. }
  59. .toast-close-button {
  60. position: relative;
  61. right: -0.3em;
  62. top: -0.3em;
  63. float: right;
  64. font-size: 20px;
  65. font-weight: bold;
  66. color: #FFFFFF;
  67. text-shadow: 0 1px 0 #ffffff;
  68. /* opacity: 0.8; */
  69. }
  70. .toast-close-button:hover,
  71. .toast-close-button:focus {
  72. color: #000000;
  73. text-decoration: none;
  74. cursor: pointer;
  75. opacity: 0.4;
  76. }
  77. /*Additional properties for button version
  78. iOS requires the button element instead of an anchor tag.
  79. If you want the anchor version, it requires `href="#"`.*/
  80. button.toast-close-button {
  81. padding: 0;
  82. cursor: pointer;
  83. background: transparent;
  84. border: 0;
  85. }
  86. .toast-container {
  87. pointer-events: none;
  88. position: fixed;
  89. z-index: 999999;
  90. }
  91. .toast-container * {
  92. box-sizing: border-box;
  93. }
  94. .toast-container .ngx-toastr {
  95. position: relative;
  96. overflow: hidden;
  97. margin: 0 0 6px;
  98. padding: 15px 15px 15px 50px;
  99. width: 300px;
  100. border-radius: 3px 3px 3px 3px;
  101. background-position: 15px center;
  102. background-repeat: no-repeat;
  103. background-size: 24px;
  104. box-shadow: 0 0 12px #999999;
  105. color: #FFFFFF;
  106. }
  107. .toast-container .ngx-toastr:hover {
  108. box-shadow: 0 0 12px #000000;
  109. opacity: 1;
  110. cursor: pointer;
  111. }
  112. /* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/info-circle.svg */
  113. .toast-info {
  114. background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z'/%3E%3C/svg%3E");
  115. }
  116. /* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/times-circle.svg */
  117. .toast-error {
  118. background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'/%3E%3C/svg%3E");
  119. }
  120. /* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/check.svg */
  121. .toast-success {
  122. background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'/%3E%3C/svg%3E");
  123. }
  124. /* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/regular/exclamation-triangle.svg */
  125. .toast-warning {
  126. background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' width='576' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E");
  127. }
  128. .toast-container.toast-top-center .ngx-toastr,
  129. .toast-container.toast-bottom-center .ngx-toastr {
  130. width: 300px;
  131. margin-left: auto;
  132. margin-right: auto;
  133. }
  134. .toast-container.toast-top-full-width .ngx-toastr,
  135. .toast-container.toast-bottom-full-width .ngx-toastr {
  136. width: 96%;
  137. margin-left: auto;
  138. margin-right: auto;
  139. }
  140. .ngx-toastr {
  141. background-color: #030303;
  142. pointer-events: auto;
  143. }
  144. .toast-success {
  145. background-color: #51A351;
  146. }
  147. .toast-error {
  148. background-color: #BD362F;
  149. }
  150. .toast-info {
  151. background-color: #2F96B4;
  152. }
  153. .toast-warning {
  154. background-color: #F89406;
  155. }
  156. .toast-progress {
  157. position: absolute;
  158. left: 0;
  159. bottom: 0;
  160. height: 4px;
  161. background-color: #000000;
  162. opacity: 0.4;
  163. }
  164. /* Responsive Design */
  165. @media all and (max-width: 240px) {
  166. .toast-container .ngx-toastr.div {
  167. padding: 8px 8px 8px 50px;
  168. width: 11em;
  169. }
  170. .toast-container .toast-close-button {
  171. right: -0.2em;
  172. top: -0.2em;
  173. }
  174. }
  175. @media all and (min-width: 241px) and (max-width: 480px) {
  176. .toast-container .ngx-toastr.div {
  177. padding: 8px 8px 8px 50px;
  178. width: 18em;
  179. }
  180. .toast-container .toast-close-button {
  181. right: -0.2em;
  182. top: -0.2em;
  183. }
  184. }
  185. @media all and (min-width: 481px) and (max-width: 768px) {
  186. .toast-container .ngx-toastr.div {
  187. padding: 15px 15px 15px 50px;
  188. width: 25em;
  189. }
  190. }