index.less 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. @import (reference) './variable.less';
  2. @popupPrefix: ant-popup;
  3. .@{popupPrefix} {
  4. position: fixed;
  5. top: 0;
  6. bottom: 0;
  7. left: 0;
  8. right: 0;
  9. z-index: 998;
  10. touch-action: none;
  11. &-mask {
  12. width: 100%;
  13. height: 100%;
  14. background-color: @popup-mask-product;
  15. animation-fill-mode: forwards;
  16. &-closing {
  17. animation-name: ant-popup-mask-close;
  18. }
  19. }
  20. &-content {
  21. position: fixed;
  22. background: @popup-background;
  23. animation-fill-mode: forwards;
  24. animation-timing-function: ease-out;
  25. color: @COLOR_TEXT_PRIMARY;
  26. }
  27. &-transform {
  28. &-top {
  29. top: 0;
  30. left: 0;
  31. right: 0;
  32. animation-name: ant-popup-transform-top;
  33. border-radius: 0 0 @popup-radius @popup-radius;
  34. &-close {
  35. animation-name: ant-popup-transform-top-close;
  36. }
  37. }
  38. &-right {
  39. top: 0;
  40. right: 0;
  41. bottom: 0;
  42. animation-name: ant-popup-transform-right;
  43. &-close {
  44. animation-name: ant-popup-transform-right-close;
  45. }
  46. }
  47. &-bottom {
  48. left: 0;
  49. right: 0;
  50. bottom: 0;
  51. animation-name: ant-popup-transform-bottom;
  52. border-radius: @popup-radius @popup-radius 0 0;
  53. &-close {
  54. animation-name: ant-popup-transform-bottom-close;
  55. }
  56. }
  57. &-left {
  58. top: 0;
  59. left: 0;
  60. bottom: 0;
  61. animation-name: ant-popup-transform-left;
  62. &-close {
  63. animation-name: ant-popup-transform-left-close;
  64. }
  65. }
  66. &-center {
  67. top: 50%;
  68. left: 50%;
  69. transform: translate3d(-50%, -50%, 0);
  70. animation-name: ant-popup-transform-center;
  71. border-radius: @popup-radius;
  72. background: none;
  73. &-close {
  74. animation-name: ant-popup-transform-center-close;
  75. }
  76. }
  77. }
  78. &-position {
  79. &-top {
  80. top: 0;
  81. left: 0;
  82. right: 0;
  83. animation-name: ant-popup-position-top;
  84. border-radius: 0 0 @popup-radius @popup-radius;
  85. &-close {
  86. animation-name: ant-popup-position-top-close;
  87. }
  88. }
  89. &-right {
  90. top: 0;
  91. right: 0;
  92. bottom: 0;
  93. animation-name: ant-popup-position-right;
  94. &-close {
  95. animation-name: ant-popup-position-right-close;
  96. }
  97. }
  98. &-bottom {
  99. left: 0;
  100. right: 0;
  101. bottom: 0;
  102. animation-name: ant-popup-position-bottom;
  103. border-radius: @popup-radius @popup-radius 0 0;
  104. &-close {
  105. animation-name: ant-popup-position-bottom-close;
  106. }
  107. }
  108. &-left {
  109. top: 0;
  110. left: 0;
  111. bottom: 0;
  112. animation-name: ant-popup-position-left;
  113. &-close {
  114. animation-name: ant-popup-position-left-close;
  115. }
  116. }
  117. &-center {
  118. top: 50%;
  119. left: 50%;
  120. transform: translate3d(-50%, -50%, 0);
  121. animation-name: ant-popup-position-center;
  122. border-radius: @popup-radius;
  123. background: none;
  124. &-close {
  125. animation-name: ant-popup-position-center-close;
  126. }
  127. }
  128. }
  129. }
  130. @keyframes ant-popup-transform-top {
  131. 0% {
  132. transform: translateY(-100%);
  133. }
  134. 100% {
  135. transform: translateY(0);
  136. }
  137. }
  138. @keyframes ant-popup-transform-bottom {
  139. 0% {
  140. transform: translateY(100%);
  141. }
  142. 100% {
  143. transform: translateY(0);
  144. }
  145. }
  146. @keyframes ant-popup-transform-left {
  147. 0% {
  148. transform: translateX(-100%);
  149. }
  150. 100% {
  151. transform: translateX(0);
  152. }
  153. }
  154. @keyframes ant-popup-transform-right {
  155. 0% {
  156. transform: translateX(100%);
  157. }
  158. 100% {
  159. transform: translateX(0);
  160. }
  161. }
  162. @keyframes ant-popup-transform-center {
  163. 0% {
  164. transform: translate3d(-50%, -50%, 0) scale(0.1);
  165. opacity: 0;
  166. }
  167. 100% {
  168. transform: translate3d(-50%, -50%, 0) scale(1);
  169. opacity: 1;
  170. }
  171. }
  172. @keyframes ant-popup-transform-top-close {
  173. 0% {
  174. transform: translateY(0);
  175. }
  176. 100% {
  177. transform: translateY(-100%);
  178. }
  179. }
  180. @keyframes ant-popup-transform-bottom-close {
  181. 0% {
  182. transform: translateY(0);
  183. }
  184. 100% {
  185. transform: translateY(100%);
  186. }
  187. }
  188. @keyframes ant-popup-transform-left-close {
  189. 0% {
  190. transform: translateX(0);
  191. }
  192. 100% {
  193. transform: translateX(-100%);
  194. }
  195. }
  196. @keyframes ant-popup-transform-right-close {
  197. 0% {
  198. transform: translateX(0);
  199. }
  200. 100% {
  201. transform: translateX(100%);
  202. }
  203. }
  204. @keyframes ant-popup-transform-center-close {
  205. 0% {
  206. opacity: 1;
  207. transform: translate3d(-50%, -50%, 0) scale(1);
  208. }
  209. 20% {
  210. opacity: 0.8;
  211. transform: translate3d(-50%, -50%, 0) scale(0.9);
  212. }
  213. 100% {
  214. opacity: 0;
  215. transform: translate3d(-50%, -50%, 0) scale(0.9);
  216. }
  217. }
  218. @keyframes ant-popup-position-top {
  219. 0% {
  220. top: -100%;
  221. }
  222. 100% {
  223. top: 0;
  224. }
  225. }
  226. @keyframes ant-popup-position-bottom {
  227. 0% {
  228. bottom: -100%;
  229. }
  230. 100% {
  231. bottom: 0;
  232. }
  233. }
  234. @keyframes ant-popup-position-left {
  235. 0% {
  236. left: -100%;
  237. }
  238. 100% {
  239. left: 0;
  240. }
  241. }
  242. @keyframes ant-popup-position-right {
  243. 0% {
  244. right: -100%;
  245. }
  246. 100% {
  247. right: 0;
  248. }
  249. }
  250. @keyframes ant-popup-position-center {
  251. 0% {
  252. transform: translate3d(-50%, -50%, 0) scale(0.1);
  253. opacity: 0;
  254. }
  255. 100% {
  256. transform: translate3d(-50%, -50%, 0) scale(1);
  257. opacity: 1;
  258. }
  259. }
  260. @keyframes ant-popup-position-top-close {
  261. 0% {
  262. top: 0;
  263. }
  264. 100% {
  265. top: -100%;
  266. }
  267. }
  268. @keyframes ant-popup-position-bottom-close {
  269. 0% {
  270. bottom: 0;
  271. }
  272. 100% {
  273. bottom: -100%;
  274. }
  275. }
  276. @keyframes ant-popup-position-left-close {
  277. 0% {
  278. left: 0;
  279. }
  280. 100% {
  281. left: -100%;
  282. }
  283. }
  284. @keyframes ant-popup-position-right-close {
  285. 0% {
  286. right: 0;
  287. }
  288. 100% {
  289. right: -100%;
  290. }
  291. }
  292. @keyframes ant-popup-position-center-close {
  293. 0% {
  294. opacity: 1;
  295. transform: translate3d(-50%, -50%, 0) scale(1);
  296. }
  297. 20% {
  298. opacity: 0.8;
  299. transform: translate3d(-50%, -50%, 0) scale(0.9);
  300. }
  301. 100% {
  302. opacity: 0;
  303. transform: translate3d(-50%, -50%, 0) scale(0.9);
  304. }
  305. }
  306. @keyframes ant-popup-mask-close {
  307. 0% {
  308. background-color: @popup-mask-product;
  309. }
  310. 100% {
  311. background-color: fade(@COLOR_BLACK, 0);
  312. }
  313. }