button.wxss 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. .t-float-left {
  2. float: left;
  3. }
  4. .t-float-right {
  5. float: right;
  6. }
  7. @keyframes tdesign-fade-out {
  8. from {
  9. opacity: 1;
  10. }
  11. to {
  12. opacity: 0;
  13. }
  14. }
  15. .hotspot-expanded.relative {
  16. position: relative;
  17. }
  18. .hotspot-expanded::after {
  19. content: '';
  20. display: block;
  21. position: absolute;
  22. left: 0;
  23. top: 0;
  24. right: 0;
  25. bottom: 0;
  26. transform: scale(1.5);
  27. }
  28. .t-button--size-extra-small {
  29. font-size: var(--td-button-extra-small-font-size, var(--td-font-size-base, 28rpx));
  30. padding-left: var(--td-button-extra-small-padding-horizontal, 16rpx);
  31. padding-right: var(--td-button-extra-small-padding-horizontal, 16rpx);
  32. height: var(--td-button-extra-small-height, 56rpx);
  33. line-height: var(--td-button-extra-small-height, 56rpx);
  34. }
  35. .t-button--size-extra-small .t-button__icon {
  36. font-size: var(--td-button-extra-small-icon-font-size, 36rpx);
  37. }
  38. .t-button--size-small {
  39. font-size: var(--td-button-small-font-size, var(--td-font-size-base, 28rpx));
  40. padding-left: var(--td-button-small-padding-horizontal, 24rpx);
  41. padding-right: var(--td-button-small-padding-horizontal, 24rpx);
  42. height: var(--td-button-small-height, 64rpx);
  43. line-height: var(--td-button-small-height, 64rpx);
  44. }
  45. .t-button--size-small .t-button__icon {
  46. font-size: var(--td-button-small-icon-font-size, 36rpx);
  47. }
  48. .t-button--size-medium {
  49. font-size: var(--td-button-medium-font-size, var(--td-font-size-m, 32rpx));
  50. padding-left: var(--td-button-medium-padding-horizontal, 32rpx);
  51. padding-right: var(--td-button-medium-padding-horizontal, 32rpx);
  52. height: var(--td-button-medium-height, 80rpx);
  53. line-height: var(--td-button-medium-height, 80rpx);
  54. }
  55. .t-button--size-medium .t-button__icon {
  56. font-size: var(--td-button-medium-icon-font-size, 40rpx);
  57. }
  58. .t-button--size-large {
  59. font-size: var(--td-button-large-font-size, var(--td-font-size-m, 32rpx));
  60. padding-left: var(--td-button-large-padding-horizontal, 40rpx);
  61. padding-right: var(--td-button-large-padding-horizontal, 40rpx);
  62. height: var(--td-button-large-height, 96rpx);
  63. line-height: var(--td-button-large-height, 96rpx);
  64. }
  65. .t-button--size-large .t-button__icon {
  66. font-size: var(--td-button-large-icon-font-size, 48rpx);
  67. }
  68. .t-button--default {
  69. color: var(--td-button-default-color, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
  70. background-color: var(--td-button-default-bg-color, var(--td-gray-color-3, #e7e7e7));
  71. }
  72. .t-button--default::after {
  73. border-width: var(--td-button-border-width, 4rpx);
  74. border-color: var(--td-button-default-border-color, var(--td-gray-color-3, #e7e7e7));
  75. }
  76. .t-button--default.t-button--hover {
  77. z-index: 0;
  78. }
  79. .t-button--default.t-button--hover::after {
  80. background-color: var(--td-button-default-active-bg-color, var(--td-gray-color-5, #c5c5c5));
  81. border-color: var(--td-button-default-active-border-color, var(--td-gray-color-5, #c5c5c5));
  82. }
  83. .t-button--default.t-button--disabled {
  84. color: var(--td-button-default-disabled-color, var(--td-font-gray-4, rgba(0, 0, 0, 0.26)));
  85. background-color: var(--td-button-default-disabled-bg, var(--td-gray-color-2, #eeeeee));
  86. }
  87. .t-button--default.t-button--disabled::after {
  88. border-color: var(--td-button-default-disabled-border-color, var(--td-gray-color-2, #eeeeee));
  89. }
  90. .t-button--primary {
  91. color: var(--td-button-primary-color, var(--td-text-anti-primary-color, #fff));
  92. background-color: var(--td-button-primary-bg-color, var(--td-primary-color, #0052d9));
  93. }
  94. .t-button--primary::after {
  95. border-width: var(--td-button-border-width, 4rpx);
  96. border-color: var(--td-button-primary-border-color, var(--td-primary-color, #0052d9));
  97. }
  98. .t-button--primary.t-button--hover {
  99. z-index: 0;
  100. }
  101. .t-button--primary.t-button--hover::after {
  102. background-color: var(--td-button-primary-active-bg-color, var(--td-primary-color-9, #0034b5));
  103. border-color: var(--td-button-primary-active-border-color, var(--td-primary-color-9, #0034b5));
  104. }
  105. .t-button--primary.t-button--disabled {
  106. color: var(--td-button-primary-disabled-color, var(--td-text-anti-primary-color, #fff));
  107. background-color: var(--td-button-primary-disabled-bg, var(--td-primary-color-3, #bbd3fb));
  108. }
  109. .t-button--primary.t-button--disabled::after {
  110. border-color: var(--td-button-primary-disabled-border-color, var(--td-primary-color-3, #bbd3fb));
  111. }
  112. .t-button--light {
  113. color: var(--td-button-light-color, var(--td-primary-color, #0052d9));
  114. background-color: var(--td-button-light-bg-color, var(--td-primary-color-1, #ecf2fe));
  115. }
  116. .t-button--light::after {
  117. border-width: var(--td-button-border-width, 4rpx);
  118. border-color: var(--td-button-light-border-color, var(--td-primary-color-1, #ecf2fe));
  119. }
  120. .t-button--light.t-button--hover {
  121. z-index: 0;
  122. }
  123. .t-button--light.t-button--hover::after {
  124. background-color: var(--td-button-light-active-bg-color, var(--td-primary-color-2, #d4e3fc));
  125. border-color: var(--td-button-light-active-border-color, var(--td-primary-color-2, #d4e3fc));
  126. }
  127. .t-button--light.t-button--disabled {
  128. color: var(--td-button-light-disabled-color, var(--td-primary-color-3, #bbd3fb));
  129. background-color: var(--td-button-light-disabled-bg, var(--td-primary-color-1, #ecf2fe));
  130. }
  131. .t-button--light.t-button--disabled::after {
  132. border-color: var(--td-button-light-disabled-border-color, var(--td-primary-color-1, #ecf2fe));
  133. }
  134. .t-button--danger {
  135. color: var(--td-button-danger-color, var(--td-text-anti-primary-color, #fff));
  136. background-color: var(--td-button-danger-bg-color, var(--td-error-color, var(--td-error-color-6, #e34d59)));
  137. }
  138. .t-button--danger::after {
  139. border-width: var(--td-button-border-width, 4rpx);
  140. border-color: var(--td-button-danger-border-color, var(--td-error-color, var(--td-error-color-6, #e34d59)));
  141. }
  142. .t-button--danger.t-button--hover {
  143. z-index: 0;
  144. }
  145. .t-button--danger.t-button--hover::after {
  146. background-color: var(--td-button-danger-active-bg-color, var(--td-error-color-7, #c9353f));
  147. border-color: var(--td-button-danger-active-border-color, var(--td-error-color-7, #c9353f));
  148. }
  149. .t-button--danger.t-button--disabled {
  150. color: var(--td-button-danger-disabled-color, var(--td-text-anti-primary-color, #fff));
  151. background-color: var(--td-button-danger-disabled-bg, var(--td-error-color-3, #f8b9be));
  152. }
  153. .t-button--danger.t-button--disabled::after {
  154. border-color: var(--td-button-danger-disabled-border-color, var(--td-error-color-3, #f8b9be));
  155. }
  156. .t-button {
  157. display: inline-flex;
  158. align-items: center;
  159. justify-content: center;
  160. position: relative;
  161. white-space: nowrap;
  162. text-align: center;
  163. background-image: none;
  164. transition: all 0.3s;
  165. touch-action: manipulation;
  166. border-radius: var(--td-button-border-radius, var(--td-radius-default, 12rpx));
  167. outline: none;
  168. font-family: PingFang SC, Microsoft YaHei, Arial Regular;
  169. font-weight: var(--td-button-font-weight, 600);
  170. vertical-align: top;
  171. cursor: pointer;
  172. -webkit-tap-highlight-color: transparent;
  173. -webkit-user-select: none;
  174. user-select: none;
  175. /* stylelint-disable-next-line */
  176. -webkit-appearance: none;
  177. }
  178. .t-button::after {
  179. border-radius: calc(var(--td-button-border-radius, var(--td-radius-default, 12rpx)) * 2);
  180. }
  181. .t-button--text {
  182. color: var(--td-button-default-color, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
  183. background: none;
  184. }
  185. .t-button--text::after {
  186. border: 0;
  187. }
  188. .t-button--text.t-button--hover::after {
  189. background-color: var(--td-button-default-text-active-bg-color, var(--td-gray-color-3, #e7e7e7));
  190. }
  191. .t-button--text.t-button--primary {
  192. color: var(--td-button-primary-text-color, var(--td-primary-color, #0052d9));
  193. background: none;
  194. }
  195. .t-button--text.t-button--primary.t-button--hover::after {
  196. background-color: var(--td-button-primary-text-active-bg-color, var(--td-gray-color-3, #e7e7e7));
  197. }
  198. .t-button--text.t-button--primary.t-button--disabled {
  199. color: var(--td-button-primary-text-disabled-color, var(--td-primary-color-3, #bbd3fb));
  200. background: none;
  201. }
  202. .t-button--text.t-button--danger {
  203. color: var(--td-button-danger-text-color, var(--td-error-color, var(--td-error-color-6, #e34d59)));
  204. background: none;
  205. }
  206. .t-button--text.t-button--danger.t-button--hover::after {
  207. background-color: var(--td-button-danger-text-active-bg-color, var(--td-gray-color-3, #e7e7e7));
  208. }
  209. .t-button--text.t-button--danger.t-button--disabled {
  210. color: var(--td-button-danger-text-disabled-color, var(--td-button-danger-disabled-color, var(--td-text-anti-primary-color, #fff)));
  211. background: none;
  212. }
  213. .t-button--text.t-button--light {
  214. color: var(--td-button-light-text-color, var(--td-primary-color, #0052d9));
  215. background: none;
  216. }
  217. .t-button--text.t-button--light.t-button--hover::after {
  218. background-color: var(--td-button-light-text-active-bg-color, var(--td-gray-color-3, #e7e7e7));
  219. }
  220. .t-button--text.t-button--disabled {
  221. color: var(--td-button-default-disabled-color, var(--td-font-gray-4, rgba(0, 0, 0, 0.26)));
  222. }
  223. .t-button--ghost {
  224. background-color: transparent;
  225. color: var(--td-button-ghost-color, var(--td-bg-color-block, #fff));
  226. }
  227. .t-button--ghost::after {
  228. border-color: var(--td-button-ghost-border-color, var(--td-button-ghost-color, var(--td-bg-color-block, #fff)));
  229. }
  230. .t-button--ghost.t-button--hover::after {
  231. background: none;
  232. }
  233. .t-button--ghost.t-button--primary {
  234. color: var(--td-button-ghost-primary-color, var(--td-primary-color, #0052d9));
  235. }
  236. .t-button--ghost.t-button--primary::after {
  237. border-color: var(--td-button-ghost-primary-border-color, var(--td-primary-color, #0052d9));
  238. }
  239. .t-button--ghost.t-button--danger {
  240. color: var(--td-button-ghost-danger-color, var(--td-error-color, var(--td-error-color-6, #e34d59)));
  241. }
  242. .t-button--ghost.t-button--danger::after {
  243. border-color: var(--td-button-ghost-danger-border-color, var(--td-error-color, var(--td-error-color-6, #e34d59)));
  244. }
  245. .t-button--ghost.t-button--disabled {
  246. background-color: transparent;
  247. color: var(--td-button-ghost-disabled-color, rgba(255, 255, 255, 0.35));
  248. }
  249. .t-button--ghost.t-button--disabled::after {
  250. border-color: var(--td-button-ghost-disabled-color, rgba(255, 255, 255, 0.35));
  251. }
  252. .t-button--outline {
  253. color: var(--td-button-default-outline-color, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
  254. background-color: transparent;
  255. }
  256. .t-button--outline::after {
  257. border-color: var(--td-button-default-outline-border-color, var(--td-gray-color-4, #dcdcdc));
  258. }
  259. .t-button--outline.t-button--hover::after {
  260. background-color: var(--td-button-default-outline-active-bg-color, var(--td-gray-color-3, #e7e7e7));
  261. border-color: var(--td-button-default-outline-active-border-color, var(--td-gray-color-4, #dcdcdc));
  262. }
  263. .t-button--outline.t-button--disabled {
  264. color: var(--td-button-default-outline-disabled-color, var(--td-gray-color-4, #dcdcdc));
  265. }
  266. .t-button--outline.t-button--disabled::after {
  267. border-color: var(--td-button-default-outline-disabled-color, var(--td-gray-color-4, #dcdcdc));
  268. }
  269. .t-button--outline.t-button--primary {
  270. color: var(--td-button-primary-outline-color, var(--td-primary-color, #0052d9));
  271. }
  272. .t-button--outline.t-button--primary::after {
  273. border-color: var(--td-button-primary-outline-border-color, var(--td-button-primary-outline-color, var(--td-primary-color, #0052d9)));
  274. }
  275. .t-button--outline.t-button--primary.t-button--hover {
  276. color: var(--td-button-primary-outline-active-border-color, var(--td-primary-color-9, #0034b5));
  277. }
  278. .t-button--outline.t-button--primary.t-button--hover::after {
  279. background-color: var(--td-button-primary-outline-active-bg-color, var(--td-gray-color-3, #e7e7e7));
  280. border-color: var(--td-button-primary-outline-active-border-color, var(--td-primary-color-9, #0034b5));
  281. }
  282. .t-button--outline.t-button--primary.t-button--disabled {
  283. background-color: transparent;
  284. color: var(--td-button-primary-outline-disabled-color, var(--td-primary-color-3, #bbd3fb));
  285. }
  286. .t-button--outline.t-button--primary.t-button--disabled::after {
  287. border-color: var(--td-button-primary-outline-disabled-color, var(--td-primary-color-3, #bbd3fb));
  288. }
  289. .t-button--outline.t-button--danger {
  290. color: var(--td-button-danger-outline-color, var(--td-error-color, var(--td-error-color-6, #e34d59)));
  291. }
  292. .t-button--outline.t-button--danger::after {
  293. border-color: var(--td-button-danger-outline-border-color, var(--td-button-danger-outline-color, var(--td-error-color, var(--td-error-color-6, #e34d59))));
  294. }
  295. .t-button--outline.t-button--danger.t-button--hover {
  296. color: var(--td-button-danger-outline-active-border-color, var(--td-error-color-7, #c9353f));
  297. }
  298. .t-button--outline.t-button--danger.t-button--hover::after {
  299. background-color: var(--td-button-danger-outline-active-bg-color, var(--td-gray-color-3, #e7e7e7));
  300. border-color: var(--td-button-danger-outline-active-border-color, var(--td-error-color-7, #c9353f));
  301. }
  302. .t-button--outline.t-button--danger.t-button--disabled {
  303. background-color: transparent;
  304. color: var(--td-button-danger-outline-disabled-color, var(--td-error-color-3, #f8b9be));
  305. }
  306. .t-button--outline.t-button--danger.t-button--disabled::after {
  307. border-color: var(--td-button-danger-outline-disabled-color, var(--td-error-color-3, #f8b9be));
  308. }
  309. .t-button--outline.t-button--light {
  310. color: var(--td-button-light-outline-color, var(--td-primary-color, #0052d9));
  311. background-color: var(--td-button-light-outline-bg-color, var(--td-primary-color-1, #ecf2fe));
  312. }
  313. .t-button--outline.t-button--light::after {
  314. border-color: var(--td-button-light-outline-border-color, var(--td-button-light-outline-color, var(--td-primary-color, #0052d9)));
  315. }
  316. .t-button--outline.t-button--light.t-button--hover {
  317. color: var(--td-button-light-outline-active-border-color, var(--td-primary-color-9, #0034b5));
  318. }
  319. .t-button--outline.t-button--light.t-button--hover::after {
  320. background-color: var(--td-button-light-outline-active-bg-color, var(--td-primary-color-2, #d4e3fc));
  321. border-color: var(--td-button-light-outline-active-border-color, var(--td-primary-color-9, #0034b5));
  322. }
  323. .t-button--outline.t-button--light.t-button--disabled {
  324. background-color: transparent;
  325. color: var(--td-button-light-outline-disabled-color, var(--td-primary-color-3, #bbd3fb));
  326. }
  327. .t-button--outline.t-button--light.t-button--disabled::after {
  328. border-color: var(--td-button-light-outline-disabled-color, var(--td-primary-color-3, #bbd3fb));
  329. }
  330. .t-button--dashed {
  331. background-color: transparent;
  332. border-style: dashed;
  333. }
  334. .t-button--dashed.t-button--primary {
  335. color: var(--td-button-primary-dashed-color, var(--td-primary-color, #0052d9));
  336. }
  337. .t-button--dashed.t-button--primary::after {
  338. border-color: var(--td-button-primary-dashed-border-color, var(--td-button-primary-dashed-color, var(--td-primary-color, #0052d9)));
  339. }
  340. .t-button--dashed.t-button--primary.t-button--disabled {
  341. background-color: transparent;
  342. color: var(--td-button-primary-dashed-disabled-color, var(--td-primary-color-3, #bbd3fb));
  343. }
  344. .t-button--dashed.t-button--primary.t-button--disabled::after {
  345. border-color: var(--td-button-primary-dashed-disabled-color, var(--td-primary-color-3, #bbd3fb));
  346. }
  347. .t-button--dashed.t-button--danger {
  348. color: var(--td-button-danger-dashed-color, var(--td-error-color, var(--td-error-color-6, #e34d59)));
  349. }
  350. .t-button--dashed.t-button--danger::after {
  351. border-color: var(--td-button-danger-dashed-border-color, var(--td-button-danger-dashed-color, var(--td-error-color, var(--td-error-color-6, #e34d59))));
  352. }
  353. .t-button--dashed.t-button--danger.t-button--disabled {
  354. background-color: transparent;
  355. color: var(--td-button-danger-dashed-disabled-color, var(--td-button-danger-disabled-color, var(--td-text-anti-primary-color, #fff)));
  356. }
  357. .t-button--dashed.t-button--danger.t-button--disabled::after {
  358. border-color: var(--td-button-danger-dashed-disabled-color, var(--td-button-danger-disabled-color, var(--td-text-anti-primary-color, #fff)));
  359. }
  360. .t-button__loading + .t-button__content:not(:empty),
  361. .t-button__icon + .t-button__content:not(:empty) {
  362. margin-left: 8rpx;
  363. }
  364. .t-button__icon {
  365. border-radius: var(--td-button-icon-border-radius, 8rpx);
  366. }
  367. .t-button--round.t-button--size-large {
  368. border-radius: calc(var(--td-button-large-height, 96rpx) / 2);
  369. }
  370. .t-button--round.t-button--size-large::after {
  371. border-radius: var(--td-button-large-height, 96rpx);
  372. }
  373. .t-button--round.t-button--size-medium {
  374. border-radius: calc(var(--td-button-medium-height, 80rpx) / 2);
  375. }
  376. .t-button--round.t-button--size-medium::after {
  377. border-radius: var(--td-button-medium-height, 80rpx);
  378. }
  379. .t-button--round.t-button--size-small {
  380. border-radius: calc(var(--td-button-small-height, 64rpx) / 2);
  381. }
  382. .t-button--round.t-button--size-small::after {
  383. border-radius: var(--td-button-small-height, 64rpx);
  384. }
  385. .t-button--round.t-button--size-extra-small {
  386. border-radius: calc(var(--td-button-extra-small-height, 56rpx) / 2);
  387. }
  388. .t-button--round.t-button--size-extra-small::after {
  389. border-radius: var(--td-button-extra-small-height, 56rpx);
  390. }
  391. .t-button--square {
  392. padding: 0;
  393. }
  394. .t-button--square.t-button--size-large {
  395. width: var(--td-button-large-height, 96rpx);
  396. }
  397. .t-button--square.t-button--size-medium {
  398. width: var(--td-button-medium-height, 80rpx);
  399. }
  400. .t-button--square.t-button--size-small {
  401. width: var(--td-button-small-height, 64rpx);
  402. }
  403. .t-button--square.t-button--size-extra-small {
  404. width: var(--td-button-extra-small-height, 56rpx);
  405. }
  406. .t-button--circle {
  407. padding: 0;
  408. border-radius: 50%;
  409. }
  410. .t-button--circle.t-button--size-large {
  411. width: var(--td-button-large-height, 96rpx);
  412. }
  413. .t-button--circle.t-button--size-large::after {
  414. border-radius: 50%;
  415. }
  416. .t-button--circle.t-button--size-medium {
  417. width: var(--td-button-medium-height, 80rpx);
  418. }
  419. .t-button--circle.t-button--size-medium::after {
  420. border-radius: 50%;
  421. }
  422. .t-button--circle.t-button--size-small {
  423. width: var(--td-button-small-height, 64rpx);
  424. }
  425. .t-button--circle.t-button--size-small::after {
  426. border-radius: 50%;
  427. }
  428. .t-button--circle.t-button--size-extra-small {
  429. width: var(--td-button-extra-small-height, 56rpx);
  430. }
  431. .t-button--circle.t-button--size-extra-small::after {
  432. border-radius: 50%;
  433. }
  434. .t-button--block {
  435. display: flex;
  436. width: 100%;
  437. }
  438. .t-button--disabled {
  439. cursor: not-allowed;
  440. }
  441. .t-button__loading--wrapper {
  442. display: flex;
  443. align-items: center;
  444. justify-content: center;
  445. }
  446. .t-button__loading--indicator {
  447. color: var(--td-white-color-1, #fff);
  448. }
  449. .t-button.t-button--hover::after {
  450. z-index: -1;
  451. }