input.wxss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. page {
  29. --td-input-bg-color: #fff;
  30. --td-input-text-color: #000000;
  31. --td-input-placeholder-text-color: rgba(0, 0, 0, 0.4);
  32. --td-input-error-msg-color: rgba(0, 0, 0, 0.4);
  33. --td-input-disabled-text-color: #000000;
  34. --td-input-label-color: #000;
  35. --td-input-icon-color: #bbbbbb;
  36. --td-input-error-text-color: #e34d59;
  37. --td-input-suffix-text-color: #000000;
  38. --td-input-border-color: #e7e7e7;
  39. }
  40. .t-input--bordered::after {
  41. position: absolute;
  42. box-sizing: border-box;
  43. content: ' ';
  44. pointer-events: none;
  45. right: 0;
  46. left: 0;
  47. bottom: 0;
  48. border-bottom: 1px solid var(--td-input-border-color);
  49. transform: scaleY(0.5);
  50. left: 32rpx;
  51. }
  52. .t-input {
  53. position: relative;
  54. display: flex;
  55. padding: 24rpx 32rpx;
  56. background: var(--td-input-bg-color);
  57. }
  58. .t-input__label {
  59. width: 164rpx;
  60. color: var(--td-input-label-color);
  61. margin-right: 32rpx;
  62. flex: none;
  63. }
  64. .t-input__icon-wrap,
  65. .t-input__icon--prefix,
  66. .t-input__icon--suffix {
  67. display: flex;
  68. align-items: center;
  69. }
  70. .t-input__icon--prefix {
  71. margin-right: 8rpx;
  72. }
  73. .t-input__content {
  74. display: flex;
  75. align-items: center;
  76. width: 100%;
  77. font-size: 32rpx;
  78. }
  79. .t-input__wrap {
  80. display: flex;
  81. flex-wrap: wrap;
  82. flex: auto;
  83. }
  84. .t-input__wrap--suffix,
  85. .t-input__wrap--icon {
  86. flex: 0 0 auto;
  87. margin-left: 24rpx;
  88. color: var(--td-input-icon-color);
  89. font-size: 32rpx;
  90. }
  91. .t-input__wrap--suffix:empty,
  92. .t-input__wrap--icon:empty {
  93. display: none;
  94. }
  95. .t-input__wrap--suffix {
  96. position: relative;
  97. padding-left: 24rpx;
  98. }
  99. .t-input__wrap--suffix::after {
  100. position: absolute;
  101. box-sizing: border-box;
  102. content: ' ';
  103. pointer-events: none;
  104. top: 0;
  105. bottom: 0;
  106. left: 0;
  107. border-left: 1px solid #e6e6e6;
  108. transform: scaleX(0.5);
  109. }
  110. .t-input__wrap--suffix-text {
  111. position: relative;
  112. padding-left: 24rpx;
  113. color: var(--td-input-suffix-text-color);
  114. }
  115. .t-input__control {
  116. display: block;
  117. box-sizing: border-box;
  118. width: 100%;
  119. min-width: 0;
  120. margin: 0;
  121. padding: 0;
  122. color: var(--td-input-text-color);
  123. line-height: inherit;
  124. text-align: left;
  125. background-color: transparent;
  126. border: 0;
  127. resize: none;
  128. font-size: inherit;
  129. }
  130. .t-input__control::placeholder {
  131. color: var(--td-input-placeholder-text-color);
  132. }
  133. .t-input__control:disabled {
  134. color: var(--td-input-disabled-text-color);
  135. background-color: transparent;
  136. cursor: not-allowed;
  137. opacity: 1;
  138. -webkit-text-fill-color: currentColor;
  139. }
  140. .t-input__control:read-only {
  141. cursor: default;
  142. }
  143. .t-input__control--right {
  144. text-align: right;
  145. }
  146. .t-input__control--center {
  147. text-align: center;
  148. }
  149. .t-input__placeholder {
  150. color: var(--td-input-placeholder-text-color);
  151. }
  152. .t-input.t-is-error {
  153. align-items: flex-start;
  154. }
  155. .t-input.t-is-error .t-input__control {
  156. color: var(--td-input-error-text-color);
  157. }
  158. .t-input.t-is-error .t-input__control::placeholder {
  159. color: var(--td-input-error-text-color);
  160. }
  161. .t-input.t-is-error .t-input__placeholder {
  162. color: var(--td-input-error-text-color);
  163. }
  164. .t-input.t-is-error .t-input__error-msg {
  165. text-align: left;
  166. padding-top: 24rpx;
  167. font-size: 24rpx;
  168. line-height: 1;
  169. color: var(--td-input-error-msg-color);
  170. width: 100%;
  171. }
  172. .t-input--size-medium {
  173. padding-top: 32rpx;
  174. padding-bottom: 32rpx;
  175. }
  176. .t-input--size-small {
  177. padding-top: 24rpx;
  178. padding-bottom: 24rpx;
  179. }