You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
5.6 KiB

7 years ago
  1. /*!
  2. * Angular Material Design
  3. * https://github.com/angular/material
  4. * @license MIT
  5. * v1.1.3
  6. */
  7. .md-toast-text {
  8. padding: 0 6px; }
  9. md-toast {
  10. position: absolute;
  11. z-index: 105;
  12. box-sizing: border-box;
  13. cursor: default;
  14. overflow: hidden;
  15. padding: 8px;
  16. opacity: 1;
  17. -webkit-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  18. transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  19. /* Transition differently when swiping */
  20. /*
  21. * When the toast doesn't take up the whole screen,
  22. * make it rotate when the user swipes it away
  23. */ }
  24. md-toast .md-toast-content {
  25. display: -webkit-box;
  26. display: -webkit-flex;
  27. display: flex;
  28. direction: row;
  29. -webkit-box-align: center;
  30. -webkit-align-items: center;
  31. align-items: center;
  32. max-height: 168px;
  33. max-width: 100%;
  34. min-height: 48px;
  35. padding: 0 18px;
  36. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  37. border-radius: 2px;
  38. font-size: 14px;
  39. overflow: hidden;
  40. -webkit-transform: translate3d(0, 0, 0) rotateZ(0deg);
  41. transform: translate3d(0, 0, 0) rotateZ(0deg);
  42. -webkit-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  43. transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  44. -webkit-box-pack: start;
  45. -webkit-justify-content: flex-start;
  46. justify-content: flex-start; }
  47. md-toast .md-toast-content::before {
  48. content: '';
  49. min-height: 48px;
  50. visibility: hidden;
  51. display: inline-block; }
  52. [dir=rtl] md-toast .md-toast-content {
  53. -webkit-box-pack: end;
  54. -webkit-justify-content: flex-end;
  55. justify-content: flex-end; }
  56. md-toast .md-toast-content span {
  57. -webkit-box-flex: 1;
  58. -webkit-flex: 1 1 0%;
  59. flex: 1 1 0%;
  60. box-sizing: border-box;
  61. min-width: 0; }
  62. md-toast.md-capsule {
  63. border-radius: 24px; }
  64. md-toast.md-capsule .md-toast-content {
  65. border-radius: 24px; }
  66. md-toast.ng-leave-active .md-toast-content {
  67. -webkit-transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
  68. transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); }
  69. md-toast.md-swipeleft .md-toast-content, md-toast.md-swiperight .md-toast-content, md-toast.md-swipeup .md-toast-content, md-toast.md-swipedown .md-toast-content {
  70. -webkit-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  71. transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
  72. md-toast.ng-enter {
  73. opacity: 0; }
  74. md-toast.ng-enter .md-toast-content {
  75. -webkit-transform: translate3d(0, 100%, 0);
  76. transform: translate3d(0, 100%, 0); }
  77. md-toast.ng-enter.md-top .md-toast-content {
  78. -webkit-transform: translate3d(0, -100%, 0);
  79. transform: translate3d(0, -100%, 0); }
  80. md-toast.ng-enter.ng-enter-active {
  81. opacity: 1; }
  82. md-toast.ng-enter.ng-enter-active .md-toast-content {
  83. -webkit-transform: translate3d(0, 0, 0);
  84. transform: translate3d(0, 0, 0); }
  85. md-toast.ng-leave.ng-leave-active .md-toast-content {
  86. opacity: 0;
  87. -webkit-transform: translate3d(0, 100%, 0);
  88. transform: translate3d(0, 100%, 0); }
  89. md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content {
  90. -webkit-transform: translate3d(0, -50%, 0);
  91. transform: translate3d(0, -50%, 0); }
  92. md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content {
  93. -webkit-transform: translate3d(0, 50%, 0);
  94. transform: translate3d(0, 50%, 0); }
  95. md-toast.ng-leave.ng-leave-active.md-top .md-toast-content {
  96. -webkit-transform: translate3d(0, -100%, 0);
  97. transform: translate3d(0, -100%, 0); }
  98. md-toast .md-action {
  99. line-height: 19px;
  100. margin-left: 24px;
  101. margin-right: 0;
  102. cursor: pointer;
  103. text-transform: uppercase;
  104. float: right; }
  105. md-toast .md-button {
  106. min-width: 0;
  107. margin-right: 0;
  108. margin-left: 12px; }
  109. [dir=rtl] md-toast .md-button {
  110. margin-right: 12px; }
  111. [dir=rtl] md-toast .md-button {
  112. margin-left: 0; }
  113. @media (max-width: 959px) {
  114. md-toast {
  115. left: 0;
  116. right: 0;
  117. width: 100%;
  118. max-width: 100%;
  119. min-width: 0;
  120. border-radius: 0;
  121. bottom: 0;
  122. padding: 0; }
  123. md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content {
  124. -webkit-transform: translate3d(0, -50%, 0);
  125. transform: translate3d(0, -50%, 0); }
  126. md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content {
  127. -webkit-transform: translate3d(0, 50%, 0);
  128. transform: translate3d(0, 50%, 0); } }
  129. @media (min-width: 960px) {
  130. md-toast {
  131. min-width: 304px;
  132. /*
  133. * When the toast doesn't take up the whole screen,
  134. * make it rotate when the user swipes it away
  135. */ }
  136. md-toast.md-bottom {
  137. bottom: 0; }
  138. md-toast.md-left {
  139. left: 0; }
  140. md-toast.md-right {
  141. right: 0; }
  142. md-toast.md-top {
  143. top: 0; }
  144. md-toast._md-start {
  145. left: 0; }
  146. [dir=rtl] md-toast._md-start {
  147. left: auto;
  148. right: 0; }
  149. md-toast._md-end {
  150. right: 0; }
  151. [dir=rtl] md-toast._md-end {
  152. right: auto;
  153. left: 0; }
  154. md-toast.ng-leave.ng-leave-active.md-swipeleft .md-toast-content {
  155. -webkit-transform: translate3d(-50%, 0, 0);
  156. transform: translate3d(-50%, 0, 0); }
  157. md-toast.ng-leave.ng-leave-active.md-swiperight .md-toast-content {
  158. -webkit-transform: translate3d(50%, 0, 0);
  159. transform: translate3d(50%, 0, 0); } }
  160. @media (min-width: 1920px) {
  161. md-toast .md-toast-content {
  162. max-width: 568px; } }
  163. @media screen and (-ms-high-contrast: active) {
  164. md-toast {
  165. border: 1px solid #fff; } }
  166. .md-toast-animating {
  167. overflow: hidden !important; }