bacisSteps.scss 10 KB

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