bacisSteps.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. $module: #{$prefix}-steps;
  2. $item: #{$module}-item;
  3. $basicType: #{$module}-basic;
  4. .#{$basicType} {
  5. &.#{$module}-horizontal {
  6. display: flex;
  7. flex-flow: row nowrap;
  8. &.#{$module}-hasline {
  9. .#{$item}-title {
  10. &::after {
  11. content: "";
  12. position: absolute;
  13. top: 50%;
  14. left: 100%;
  15. display: block;
  16. width: $width-steps_title_after;
  17. height: $height-steps_title_after;
  18. background: $color-steps_title_after-bg;
  19. }
  20. }
  21. }
  22. .#{$item} {
  23. padding-left: $spacing-steps_basic_item-paddingLeft;
  24. &:first-child {
  25. padding-left: 0;
  26. }
  27. &:last-child {
  28. flex: none;
  29. .#{$item}-title {
  30. max-width: 100%;
  31. padding-right: 0;
  32. &::after {
  33. display: none;
  34. }
  35. }
  36. }
  37. &-done {
  38. .#{$item}-container {
  39. .#{$item}-title {
  40. &::after {
  41. background: $color-steps_item_done_after-bg;
  42. }
  43. }
  44. }
  45. }
  46. .#{$item}-content {
  47. flex: 1;
  48. }
  49. .#{$item}-description {
  50. @include font-size-small;
  51. color: $color-steps_minor-text-default;
  52. width: $width-steps_basic_item_description;
  53. max-width: $width-steps_basic_item_description-maxWidth;
  54. @include text-overflow-hidden;
  55. }
  56. .#{$item}-title {
  57. max-width: $width-steps_basic_item_title-maxWidth;
  58. .#{$item}-title-text {
  59. @include text-overflow-hidden;
  60. transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text
  61. }
  62. }
  63. }
  64. }
  65. &.#{$module}-vertical {
  66. display: flex;
  67. flex-flow: column nowrap;
  68. .#{$item}-icon {
  69. box-sizing: content-box;
  70. }
  71. &.#{$module}-small {
  72. .#{$item} {
  73. .#{$item}-content {
  74. min-height: $height-steps_basic_vertical_small_item_content-minHeight;
  75. }
  76. }
  77. }
  78. &.#{$module}-hasline {
  79. .#{$item}-icon {
  80. &::after {
  81. content: "";
  82. position: absolute;
  83. top: 100%;
  84. left: 50%;
  85. display: block;
  86. width: $width-steps_vertical_icon_after;
  87. height: $height-steps_vertical_icon_after;
  88. background: $color-steps_icon_after-bg;
  89. }
  90. }
  91. }
  92. .#{$item} {
  93. padding-top: $spacing-steps_basic_vertical_item-paddingTop;
  94. &:first-child {
  95. padding-top: 0;
  96. }
  97. &:last-child {
  98. .#{$item}-icon {
  99. &::after {
  100. display: none;
  101. }
  102. }
  103. }
  104. &-done {
  105. .#{$item}-icon {
  106. &::after {
  107. background: $color-steps_item_done_icon_after-bg;
  108. }
  109. }
  110. }
  111. .#{$item}-content {
  112. min-height: $height-steps_basic_vertical_icon_content-minHeight;
  113. padding-bottom: $spacing-steps_basic_vertical_item_content-paddingBottom;
  114. }
  115. .#{$item}-icon {
  116. display: inline-flex;
  117. position: relative;
  118. padding-bottom: $spacing-steps_basic_vertical_item_icon-paddingBottom;
  119. }
  120. .#{$item}-description {
  121. @include font-size-small;
  122. color: $color-steps_minor-text-default;
  123. width: $width-steps_basic_vertical_item_description;
  124. }
  125. .#{$item}-title {
  126. max-width: $width-steps_basic_vertical_item_title-maxWidth;
  127. .#{$item}-title-text {
  128. @include text-overflow-hidden;
  129. }
  130. }
  131. }
  132. }
  133. .#{$item} {
  134. @include box-sizing;
  135. position: relative;
  136. display: inline-block;
  137. vertical-align: top;
  138. overflow: hidden;
  139. flex: 1;
  140. transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text, //step文字color的transition变化
  141. background-color $transition_duration-steps_item-backgroundColor $transition_function-steps_item_backgroundColor $transition_delay-steps_item_backgroundColor; //step backgroundColor 的transition变化
  142. transform:scale($transform_scale-step-item);
  143. &-clickable {
  144. cursor: pointer;
  145. }
  146. &-hover:hover {
  147. .#{$item}-title {
  148. color: $color-steps_item_title-text-hover;
  149. }
  150. .#{$item}-description {
  151. color: $color-steps_item_description-text-hover;
  152. }
  153. }
  154. .#{$item}-container {
  155. display: flex;
  156. align-items: flex-start;
  157. }
  158. .#{$item}-left {
  159. display: flex;
  160. justify-content: center;
  161. align-items: center;
  162. margin-right: $spacing-steps_basic_item_left-marginRight;
  163. .#{$item}-icon {
  164. display: flex;
  165. height: $height-steps_basic_item_left-icon;
  166. align-items: center;
  167. }
  168. .#{$item}-number-icon {
  169. display: inline-flex;
  170. align-items: center;
  171. justify-content: center;
  172. width: $width-steps_basic_item_left_number-icon;
  173. height: $height-steps_basic_item_left_number-icon;
  174. @include font-size-header-6;
  175. font-weight: $font-steps_basic_item_left_number_icon-fontWeight;
  176. background: $color-steps_item_left_number_icon-bg;
  177. border-radius: $radius-steps_basic_item_left_number_icon;
  178. color: $color-steps_item_left_number_icon-icon;
  179. transition: color $transition_duration-steps_item_title-icon $transition_function-steps_item_title-icon $transition_delay-steps_item_title-icon; //step icon color的transition变化
  180. }
  181. }
  182. .#{$item}-title {
  183. position: relative;
  184. display: inline-block;
  185. @include font-size-header-6;
  186. line-height: $font-steps_basic_item_title-lineHeight;
  187. font-weight: $font-steps_basic_item_title-fontWeight;
  188. color: $color-steps_main-text-default;
  189. vertical-align: top;
  190. padding-right: $spacing-steps_basic_item_title-paddingRight;
  191. padding-bottom: $spacing-steps_basic_item_title-paddingBottom;
  192. transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text; //step文字color的transition变化
  193. }
  194. // 完成状态的样式
  195. &-finish {
  196. .#{$item}-left {
  197. .#{$item}-icon {
  198. color: $color-steps_item_finish-icon;
  199. .#{$item}-number-icon {
  200. color: $color-steps_item_finish_number-icon;
  201. }
  202. }
  203. }
  204. }
  205. // 等待状态的样式
  206. &-wait {
  207. .#{$item}-title {
  208. color: $color-steps_item_wait_title-text;
  209. }
  210. .#{$item}-left {
  211. .#{$item}-icon {
  212. color: $color-steps_item_wait_left_icon-icon;
  213. .#{$item}-number-icon {
  214. background: $color-steps_item_wait_left_number_icon-bg;
  215. color: $color-steps_item_wait_left_number_icon-icon;
  216. }
  217. }
  218. }
  219. &-hover:hover {
  220. .#{$item}-left {
  221. .#{$item}-icon {
  222. .#{$item}-number-icon {
  223. background: $color-steps_item_wait_left_number_icon-bg-hover;
  224. color: $color-steps_item_wait_left_number_icon-icon-hover;
  225. }
  226. }
  227. }
  228. }
  229. }
  230. // 进行状态的样式
  231. &-process {
  232. .#{$item}-left {
  233. .#{$item}-icon {
  234. color: $color-steps_item_process_left-icon;
  235. .#{$item}-number-icon {
  236. color: $color-steps_item_process_left_number-icon;
  237. }
  238. }
  239. }
  240. }
  241. // 错误状态的样式
  242. &-error {
  243. .#{$item}-left {
  244. .#{$item}-icon {
  245. color: $color-steps_item_error_left-icon;
  246. .#{$item}-number-icon {
  247. color: $color-steps_item_error_left_number-icon;
  248. }
  249. }
  250. }
  251. }
  252. // 警告状态的样式
  253. &-warning {
  254. .#{$item}-left {
  255. .#{$item}-icon {
  256. color: $color-steps_item_warning_left-icon;
  257. .#{$item}-number-icon {
  258. color: $color-steps_item_warning_left_number-icon;
  259. }
  260. }
  261. }
  262. }
  263. }
  264. &.#{$module}-small {
  265. .#{$item} {
  266. .#{$item}-title {
  267. @include font-size-regular;
  268. }
  269. .#{$item}-left {
  270. .#{$item}-icon {
  271. height: $height-steps_basic_small_item_left-icon;
  272. .#{$item}-number-icon {
  273. @include font-size-small;
  274. width: $width-steps_basic_small_item_left_number-icon;
  275. height: $width-steps_basic_small_item_left_number-icon;
  276. }
  277. }
  278. }
  279. }
  280. }
  281. }