index.less 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. @import (reference) './variable.less';
  2. @stepsPrefix: ant-steps;
  3. .@{stepsPrefix} {
  4. display: flex;
  5. overflow: hidden;
  6. &-horizontal {
  7. flex-direction: row;
  8. justify-content: space-around;
  9. }
  10. &-vertical {
  11. display: block;
  12. padding: 64 * @rpx;
  13. }
  14. &-item:last-child &-item-indicator-vertical::after {
  15. display: none;
  16. }
  17. }
  18. .ant-steps-item-vertical:last-child {
  19. padding-bottom: 0;
  20. }
  21. @stepItemPrefix: ant-steps-item;
  22. .@{stepItemPrefix} {
  23. position: relative;
  24. z-index: 5;
  25. display: flex;
  26. margin: 16 * @rpx 0 16 * @rpx 0;
  27. &-vertical {
  28. padding-bottom: 48 * @rpx;
  29. margin: 0;
  30. .ant-steps-item-title {
  31. margin-bottom: 8 * @rpx;
  32. font-size: 26 * @rpx;
  33. color: @COLOR_TEXT_PRIMARY;
  34. }
  35. .ant-steps-item-desc {
  36. font-size: 24 * @rpx;
  37. color: @COLOR_TEXT_ASSIST;
  38. }
  39. &::after {
  40. // line
  41. position: absolute;
  42. height: 100%;
  43. width: 2 * @rpx;
  44. content: '';
  45. top: 27 * @rpx;
  46. z-index: -1;
  47. transform: translateX(-50%);
  48. }
  49. .ant-steps-item-text {
  50. display: flex;
  51. flex-direction: column;
  52. flex: 1;
  53. }
  54. }
  55. &-horizontal {
  56. flex-direction: column;
  57. margin-top: 16 * @rpx;
  58. padding: 0 16 * @rpx;
  59. &::after {
  60. position: absolute;
  61. width: 100%;
  62. height: 2 * @rpx;
  63. content: '';
  64. top: 34 * @rpx;
  65. left: 0;
  66. transform: translate(50%, -50%);
  67. z-index: -1;
  68. }
  69. .@{stepItemPrefix}-title,
  70. .@{stepItemPrefix}-desc {
  71. text-align: center;
  72. }
  73. .@{stepItemPrefix}-desc {
  74. margin-bottom: 0;
  75. }
  76. }
  77. &:last-child {
  78. &::after {
  79. display: none;
  80. }
  81. }
  82. &-indicator {
  83. &-vertical {
  84. transform: translateX(-50%);
  85. }
  86. &-horizontal {
  87. display: flex;
  88. justify-content: center;
  89. margin: 16 * @rpx 0 16 * @rpx 0;
  90. }
  91. &-icon {
  92. width: 18 * @rpx;
  93. height: 18 * @rpx;
  94. border-radius: 50%;
  95. }
  96. }
  97. .ant-steps-item-active-icon-image {
  98. transform: translateX(0);
  99. }
  100. &-horizontal {
  101. flex: 1;
  102. display: flex;
  103. .ant-steps-item-title {
  104. margin-bottom: 4 * @rpx;
  105. font-size: 26 * @rpx;
  106. &:empty {
  107. display: none;
  108. }
  109. }
  110. .ant-steps-item-desc {
  111. margin: 4 * @rpx 0 4 * @rpx 0;
  112. color: @COLOR_TEXT_ASSIST;
  113. font-size: 24 * @rpx;
  114. &:empty {
  115. display: none;
  116. }
  117. }
  118. }
  119. &-active {
  120. &::after {
  121. background-color: @COLOR_GREY_2;
  122. }
  123. &-icon {
  124. display: flex;
  125. justify-content: center;
  126. align-items: center;
  127. background: transparent;
  128. &,
  129. & .a-image {
  130. height: 36 * @rpx;
  131. width: 36 * @rpx;
  132. }
  133. color: @COLOR_BRAND1;
  134. &-default {
  135. height: 20 * @rpx;
  136. width: 20 * @rpx;
  137. border-radius: 50%;
  138. background-color: @COLOR_BRAND1;
  139. }
  140. }
  141. & .@{stepItemPrefix}-title {
  142. color: @COLOR_BRAND1;
  143. }
  144. }
  145. &-non-active {
  146. &::after {
  147. background-color: @COLOR_GREY_2;
  148. }
  149. &-icon {
  150. display: flex;
  151. justify-content: center;
  152. align-items: center;
  153. background: transparent;
  154. &,
  155. & .a-image {
  156. height: 36 * @rpx;
  157. width: 36 * @rpx;
  158. }
  159. color: @COLOR_GREY_2;
  160. &-default {
  161. height: 16 * @rpx;
  162. width: 16 * @rpx;
  163. border-radius: 50%;
  164. background-color: @COLOR_GREY_2;
  165. }
  166. }
  167. & .@{stepItemPrefix}-title {
  168. color: @COLOR_TEXT_ASSIST;
  169. }
  170. }
  171. &-finish {
  172. &::after {
  173. background-color: @COLOR_BRAND1;
  174. }
  175. &-icon {
  176. display: flex;
  177. justify-content: center;
  178. align-items: center;
  179. background: transparent;
  180. &,
  181. & .a-image {
  182. height: 36 * @rpx;
  183. width: 36 * @rpx;
  184. }
  185. color: @COLOR_BRAND1;
  186. &-default {
  187. height: 16 * @rpx;
  188. width: 16 * @rpx;
  189. border-radius: 50%;
  190. background-color: @COLOR_BRAND1;
  191. }
  192. }
  193. & .@{stepItemPrefix}-title {
  194. color: @COLOR_TEXT_PRIMARY;
  195. }
  196. }
  197. &-error-icon {
  198. display: flex;
  199. justify-content: center;
  200. align-items: center;
  201. background: transparent;
  202. &,
  203. & .a-image {
  204. height: 36 * @rpx;
  205. width: 36 * @rpx;
  206. }
  207. color: @COLOR_RED;
  208. &-default {
  209. height: 20 * @rpx;
  210. width: 20 * @rpx;
  211. border-radius: 50%;
  212. background-color: @COLOR_RED;
  213. }
  214. }
  215. .ant-steps-item-title-error {
  216. color: @COLOR_RED;
  217. }
  218. }