bacisSteps.scss 9.1 KB

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