_steppers.scss 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. // Steppers
  2. ul.stepper {
  3. counter-reset: section;
  4. overflow-y: auto;
  5. overflow-x: hidden;
  6. margin: 1em -1.5rem;
  7. padding: 0 1.5rem;
  8. padding: 1.5rem;
  9. li {
  10. a {
  11. padding: $stepper-li-a-padding;
  12. text-align: center;
  13. .circle {
  14. display: inline-block;
  15. color: $stepper-li-a-circle-color;
  16. border-radius: $stepper-li-a-circle-border-radius;
  17. background: $stepper-li-a-circle-bg;
  18. width: 1.75rem;
  19. height: 1.75rem;
  20. text-align: center;
  21. line-height: 1.7rem;
  22. margin-right: $stepper-li-a-circle-mr;
  23. }
  24. .label {
  25. display: inline-block;
  26. color: $stepper-li-a-circle-bg;
  27. }
  28. }
  29. &.active,
  30. &.completed {
  31. a {
  32. .circle {
  33. @extend .primary-color;
  34. }
  35. .label {
  36. font-weight: 600;
  37. color: $stepper-li-a-label-color;
  38. }
  39. }
  40. }
  41. &.warning {
  42. a {
  43. .circle {
  44. @extend .danger-color;
  45. }
  46. }
  47. }
  48. }
  49. }
  50. // Horizontal
  51. .stepper-horizontal {
  52. position: relative;
  53. display: flex;
  54. justify-content: space-between;
  55. li {
  56. transition: $stepper-horizontal-li-transition;
  57. display: flex;
  58. align-items: center;
  59. flex: 1;
  60. position: relative;
  61. a {
  62. .label {
  63. margin-top: $stepper-horizontal-li-a-label-mt;
  64. }
  65. }
  66. &:not(:last-child):after {
  67. content: "";
  68. position: relative;
  69. flex: 1;
  70. margin: $stepper-horizontal-li-after-margin 0 0 0;
  71. height: $stepper-horizontal-li-after-height;
  72. background-color: $stepper-horizontal-li-after-bgc;
  73. }
  74. &:not(:first-child):before {
  75. content: "";
  76. position: relative;
  77. flex: 1;
  78. margin: $stepper-horizontal-li-after-margin 0 0 0;
  79. height: $stepper-horizontal-li-after-height;
  80. background-color: $stepper-horizontal-li-after-bgc;
  81. }
  82. &:hover {
  83. background-color: rgba(0, 0, 0, .06);
  84. }
  85. }
  86. @media (max-width: $stepper-horizontal-breakpoint) {
  87. flex-direction: column;
  88. li {
  89. align-items: flex-start;
  90. flex-direction: column;
  91. a {
  92. .label {
  93. flex-flow: column nowrap;
  94. order: 2;
  95. margin-top: $stepper-horizontal-small-li-a-label-mt;
  96. }
  97. }
  98. &:not(:last-child):after {
  99. content: "";
  100. position: absolute;
  101. width: $stepper-horizontal-small-li-after-width;
  102. height: $stepper-horizontal-small-li-after-height;
  103. left: $stepper-horizontal-small-li-after-left;
  104. top: $stepper-horizontal-small-li-after-top;
  105. }
  106. }
  107. }
  108. >li:not(:last-of-type) {
  109. margin-bottom: 0 !important;
  110. }
  111. }
  112. // Vertical
  113. .stepper-vertical {
  114. position: relative;
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: space-between;
  118. li {
  119. display: flex;
  120. align-items: flex-start;
  121. flex: 1;
  122. flex-direction: column;
  123. position: relative;
  124. a {
  125. align-self: flex-start;
  126. display: flex;
  127. position: relative;
  128. .circle {
  129. order: 1;
  130. }
  131. .label {
  132. flex-flow: column nowrap;
  133. order: 2;
  134. margin-top: $stepper-vertical-li-a-label-mt;
  135. }
  136. }
  137. &.completed {
  138. a {
  139. .label {
  140. font-weight: 500;
  141. }
  142. }
  143. }
  144. .step-content {
  145. display: block;
  146. margin-top: 0;
  147. margin-left: $stepper-vertical-li-step-content-ml;
  148. padding: $stepper-vertical-li-step-content-padding;
  149. p {
  150. font-size: $stepper-vertical-li-step-content-p-font-size;
  151. }
  152. }
  153. &:not(:last-child):after {
  154. content: "";
  155. position: absolute;
  156. width: $stepper-vertical-li-after-width;
  157. height: $stepper-vertical-li-after-height;
  158. left: $stepper-vertical-li-after-left;
  159. top: $stepper-vertical-li-after-top;
  160. background-color: $stepper-vertical-li-after-bgc;
  161. }
  162. }
  163. }