toast.css 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. /*!
  2. * # Fomantic-UI - Toast
  3. * http://github.com/fomantic/Fomantic-UI/
  4. *
  5. *
  6. * Released under the MIT license
  7. * http://opensource.org/licenses/MIT
  8. *
  9. */
  10. /*******************************
  11. Toast container
  12. *******************************/
  13. .ui.toast-container {
  14. position: fixed;
  15. z-index: 9999;
  16. }
  17. .ui.top.right.toast-container {
  18. top: 0.85714286em;
  19. right: 0.85714286em;
  20. margin-left: 0.85714286em;
  21. }
  22. .ui.top.left.toast-container {
  23. top: 0.85714286em;
  24. left: 0.85714286em;
  25. margin-right: 0.85714286em;
  26. }
  27. .ui.top.center.toast-container {
  28. left: 50%;
  29. -webkit-transform: translate(-50%, 0);
  30. transform: translate(-50%, 0);
  31. top: 0.85714286em;
  32. }
  33. .ui.bottom.right.toast-container {
  34. bottom: 0.85714286em;
  35. right: 0.85714286em;
  36. margin-left: 0.85714286em;
  37. }
  38. .ui.bottom.left.toast-container {
  39. bottom: 0.85714286em;
  40. left: 0.85714286em;
  41. margin-right: 0.85714286em;
  42. }
  43. .ui.bottom.center.toast-container {
  44. left: 50%;
  45. -webkit-transform: translate(-50%, 0);
  46. transform: translate(-50%, 0);
  47. bottom: 0.85714286em;
  48. }
  49. /*******************************
  50. Toast
  51. *******************************/
  52. .toast {
  53. display: block;
  54. border-radius: 0.28571429rem;
  55. padding: 0.78571429em 1em;
  56. margin: 0 0 6px;
  57. color: rgba(255, 255, 255, 0.9);
  58. }
  59. .floating.toast,
  60. .hoverfloating.toast:hover {
  61. -webkit-box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15);
  62. box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15);
  63. }
  64. .hoverfloating.message:hover {
  65. -webkit-box-shadow: 0 0 0 1px inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15);
  66. box-shadow: 0 0 0 1px inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15);
  67. }
  68. .center.toast-container .toast-box,
  69. .right.toast-container .toast-box {
  70. margin-left: auto;
  71. }
  72. .center.toast-container .toast-box {
  73. margin-right: auto;
  74. }
  75. .visible.toast-box,
  76. .animating.toast-box,
  77. .toast-box {
  78. display: table !important;
  79. }
  80. .toast-container .compact {
  81. display: block;
  82. width: 300px;
  83. }
  84. .toast-container .message,
  85. .toast:hover {
  86. opacity: 1;
  87. cursor: pointer;
  88. }
  89. .icon.toast .content {
  90. padding-left: 3em;
  91. }
  92. .toast > .content > .header {
  93. font-weight: bold;
  94. }
  95. .info.toast {
  96. background-color: #31CCEC;
  97. }
  98. .warning.toast {
  99. background-color: #F2C037;
  100. }
  101. .success.toast {
  102. background-color: #21BA45;
  103. }
  104. .error.toast {
  105. background-color: #DB2828;
  106. }
  107. .toast-box .info.attached.progress .bar {
  108. background: #12a1bf !important;
  109. }
  110. .toast-box .warning.attached.progress .bar {
  111. background: #cf9b0d !important;
  112. }
  113. .toast-box .success.attached.progress .bar {
  114. background: #15792d !important;
  115. }
  116. .toast-box .error.attached.progress .bar {
  117. background: #9c1a1a !important;
  118. }
  119. /*--------------
  120. Colors
  121. -------------- */
  122. .primary.toast {
  123. background-color: #2185D0;
  124. }
  125. .inverted.primary.toast,
  126. .toast-box .inverted.primary.attached.progress .bar {
  127. background-color: #54C8FF;
  128. }
  129. .secondary.toast {
  130. background-color: #1B1C1D;
  131. }
  132. .inverted.secondary.toast,
  133. .toast-box .inverted.secondary.attached.progress .bar {
  134. background-color: #545454;
  135. }
  136. .red.toast {
  137. background-color: #DB2828;
  138. }
  139. .inverted.red.toast,
  140. .toast-box .inverted.red.attached.progress .bar {
  141. background-color: #FF695E;
  142. }
  143. .orange.toast {
  144. background-color: #F2711C;
  145. }
  146. .inverted.orange.toast,
  147. .toast-box .inverted.orange.attached.progress .bar {
  148. background-color: #FF851B;
  149. }
  150. .yellow.toast {
  151. background-color: #FBBD08;
  152. }
  153. .inverted.yellow.toast,
  154. .toast-box .inverted.yellow.attached.progress .bar {
  155. background-color: #FFE21F;
  156. }
  157. .olive.toast {
  158. background-color: #B5CC18;
  159. }
  160. .inverted.olive.toast,
  161. .toast-box .inverted.olive.attached.progress .bar {
  162. background-color: #D9E778;
  163. }
  164. .green.toast {
  165. background-color: #21BA45;
  166. }
  167. .inverted.green.toast,
  168. .toast-box .inverted.green.attached.progress .bar {
  169. background-color: #2ECC40;
  170. }
  171. .teal.toast {
  172. background-color: #00B5AD;
  173. }
  174. .inverted.teal.toast,
  175. .toast-box .inverted.teal.attached.progress .bar {
  176. background-color: #6DFFFF;
  177. }
  178. .blue.toast {
  179. background-color: #2185D0;
  180. }
  181. .inverted.blue.toast,
  182. .toast-box .inverted.blue.attached.progress .bar {
  183. background-color: #54C8FF;
  184. }
  185. .violet.toast {
  186. background-color: #6435C9;
  187. }
  188. .inverted.violet.toast,
  189. .toast-box .inverted.violet.attached.progress .bar {
  190. background-color: #A291FB;
  191. }
  192. .purple.toast {
  193. background-color: #A333C8;
  194. }
  195. .inverted.purple.toast,
  196. .toast-box .inverted.purple.attached.progress .bar {
  197. background-color: #DC73FF;
  198. }
  199. .pink.toast {
  200. background-color: #E03997;
  201. }
  202. .inverted.pink.toast,
  203. .toast-box .inverted.pink.attached.progress .bar {
  204. background-color: #FF8EDF;
  205. }
  206. .brown.toast {
  207. background-color: #A5673F;
  208. }
  209. .inverted.brown.toast,
  210. .toast-box .inverted.brown.attached.progress .bar {
  211. background-color: #D67C1C;
  212. }
  213. .grey.toast {
  214. background-color: #767676;
  215. }
  216. .inverted.grey.toast,
  217. .toast-box .inverted.grey.attached.progress .bar {
  218. background-color: #DCDDDE;
  219. }
  220. .black.toast {
  221. background-color: #1B1C1D;
  222. }
  223. .inverted.black.toast,
  224. .toast-box .inverted.black.attached.progress .bar {
  225. background-color: #545454;
  226. }
  227. .inverted.toast {
  228. color: #AAAAAA;
  229. }
  230. /*--------------
  231. Icon
  232. ---------------*/
  233. .icon.toast > .icon:not(.close) {
  234. display: inline-block;
  235. vertical-align: middle;
  236. font-size: 1.5em;
  237. position: absolute;
  238. }
  239. .icon.toast > .content {
  240. display: inline-block;
  241. vertical-align: middle;
  242. }
  243. /*---------------
  244. Progress Bar
  245. ----------------*/
  246. .toast-box .attached.progress .bar {
  247. min-width: 0;
  248. }
  249. .toast-box .active.progress .bar:after {
  250. -webkit-animation: progress-active 2s ease infinite !important;
  251. animation: progress-active 2s ease infinite !important;
  252. }
  253. .toast-box {
  254. margin-bottom: 6px;
  255. }
  256. .toast-box .toast,
  257. .toast-box .message {
  258. margin-top: 0;
  259. margin-bottom: 0;
  260. position: relative;
  261. }
  262. .toast-box .attached.progress {
  263. z-index: 1;
  264. }
  265. .toast-box .bottom.attached.progress {
  266. margin: -3px 0 6px;
  267. }
  268. .toast-box .top.attached.progress {
  269. margin: 6px 0 -3px;
  270. }
  271. /* --------
  272. Close Icon
  273. -----------*/
  274. .toast-box .message > .close.icon {
  275. top: 0.3em;
  276. right: 0.3em;
  277. }
  278. .toast-box .toast > .close.icon {
  279. cursor: pointer;
  280. position: absolute;
  281. margin: 0;
  282. top: 0.3em;
  283. right: 0.3em;
  284. opacity: 0.7;
  285. -webkit-transition: opacity 0.1s ease;
  286. transition: opacity 0.1s ease;
  287. }
  288. .toast-box .toast > .close.icon:hover {
  289. opacity: 1;
  290. }