toast.css 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. uni-toast {
  2. position: fixed;
  3. top: 0;
  4. right: 0;
  5. bottom: 0;
  6. left: 0;
  7. z-index: 999;
  8. display: block;
  9. box-sizing: border-box;
  10. pointer-events: none;
  11. font-size: 16px;
  12. }
  13. .uni-sample-toast {
  14. position: fixed;
  15. z-index: 999;
  16. top: 50%;
  17. left: 50%;
  18. transform: translate(-50%, -50%);
  19. text-align: center;
  20. max-width: 80%;
  21. }
  22. .uni-simple-toast__text {
  23. display: inline-block;
  24. vertical-align: middle;
  25. color: #ffffff;
  26. background-color: rgba(17, 17, 17, 0.7);
  27. padding: 10px 20px;
  28. border-radius: 5px;
  29. font-size: 13px;
  30. text-align: center;
  31. max-width: 100%;
  32. word-break: break-all;
  33. white-space: normal;
  34. }
  35. uni-toast .uni-mask {
  36. pointer-events: auto;
  37. }
  38. .uni-toast {
  39. position: fixed;
  40. z-index: 999;
  41. width: 8em;
  42. top: 50%;
  43. left: 50%;
  44. transform: translate(-50%, -50%);
  45. background: rgba(17, 17, 17, 0.7);
  46. text-align: center;
  47. border-radius: 5px;
  48. color: #ffffff;
  49. }
  50. .uni-toast * {
  51. box-sizing: border-box;
  52. }
  53. .uni-toast__icon {
  54. margin: 20px 0 0;
  55. width: 38px!important;
  56. height: 38px!important;
  57. vertical-align: baseline!important;
  58. }
  59. .uni-icon_toast {
  60. margin: 15px 0 0;
  61. }
  62. .uni-icon_toast.uni-icon-success-no-circle:before {
  63. color: #ffffff;
  64. font-size: 55px;
  65. }
  66. .uni-icon_toast.uni-loading {
  67. margin: 20px 0 0;
  68. width: 38px;
  69. height: 38px;
  70. vertical-align: baseline;
  71. }
  72. .uni-toast__content {
  73. margin: 0 0 15px;
  74. }
  75. @media (prefers-color-scheme: dark) {
  76. .uni-toast {
  77. background-color: #606060;
  78. color: var(--UI-FG-0);
  79. }
  80. }