timeline.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. @import './variables.scss';
  2. $module: #{$prefix}-timeline;
  3. .#{$module} {
  4. margin: $spacing-timeline-margin;
  5. padding: $spacing-timeline-padding;
  6. width: $width-timeline;
  7. list-style: none;
  8. &-item {
  9. position: relative;
  10. margin: $spacing-timeline_item-margin;
  11. padding: $spacing-none $spacing-none $spacing-timeline_item-paddingBottom $spacing-none;
  12. list-style: none;
  13. &-tail {
  14. position: absolute;
  15. top: $spacing-timeline_tail-top;
  16. left: $spacing-timeline_tail-left;
  17. height: $height-timline_tail;
  18. border-left: $width-timeline_tail-border solid $color-timeline_tail-border;
  19. }
  20. &-head {
  21. position: absolute;
  22. top: $spacing-timeline_head-top;
  23. width: $width-timeline_dot;
  24. height: $width-timeline_dot;
  25. border-radius: $radius-timeline_head;
  26. &-ongoing {
  27. background-color: $color-timeline_dot_default-bg-default;
  28. }
  29. &-default {
  30. background-color: $color-timeline_dot_info-bg-default;
  31. }
  32. &-success {
  33. background-color: $color-timeline_dot_success-bg-default;
  34. }
  35. &-warning {
  36. background-color: $color-timeline_dot_warning-bg-default;
  37. }
  38. &-error {
  39. background-color: $color-timeline_dot_error-bg-default;
  40. }
  41. }
  42. &-head-custom {
  43. position: absolute;
  44. display: flex;
  45. align-self: center;
  46. top: $spacing-timeline_head_custom-top;
  47. left: $spacing-timeline_head_custom-left;
  48. width: $width-timeline_head_custom;
  49. height: $height-timeline_head_custom;
  50. // text-align: center;
  51. border: $width-timeline_head_custom-border;
  52. border-radius: $radius-timeline_head_custom;
  53. transform: $motion-timeline_head_custom-transform;
  54. }
  55. .#{$module}-item-head-custom.#{$module}-item-head-ongoing {
  56. background-color: $color-timeline_item_head-bg;
  57. color: $color-timeline_dot_default-bg-default;
  58. }
  59. .#{$module}-item-head-custom.#{$module}-item-head-success {
  60. background-color: $color-timeline_item_head-bg;
  61. color: $color-timeline_dot_success-bg-default;
  62. }
  63. .#{$module}-item-head-custom.#{$module}-item-head-warning {
  64. background-color: $color-timeline_item_head-bg;
  65. color: $color-timeline_dot_warning-bg-default;
  66. }
  67. .#{$module}-item-head-custom.#{$module}-item-head-error {
  68. background-color: $color-timeline_item_head-bg;
  69. color: $color-timeline_dot_error-bg-default;
  70. }
  71. .#{$module}-item-head-custom.#{$module}-item-head-default {
  72. background-color: $color-timeline_item_head-bg;
  73. color: $color-timeline_dot_info-bg-default;
  74. }
  75. &-content {
  76. @include font-size-regular;
  77. position: relative;
  78. margin: $spacing-none $spacing-none $spacing-none $spacing-timeline_content-marginLeft;
  79. word-break: break-word;
  80. color: $color-timeline_item_content-text-default;
  81. &-extra,
  82. &-time {
  83. @include font-size-small;
  84. color: $color-timeline_time_default-text-default;
  85. margin-top: $spacing-timeline_time-marginTop;
  86. }
  87. }
  88. &:last-child {
  89. & > .#{$module}-item-tail {
  90. border-left: none;
  91. }
  92. }
  93. }
  94. &-alternate,
  95. &-right,
  96. &-center {
  97. .#{$module}-item {
  98. &-tail,
  99. &-head,
  100. &-head-custom {
  101. left: $spacing-timeline_item_head_custom-left;
  102. }
  103. &-head{
  104. &.#{$module}-item-head-custom{
  105. margin-left: 0;
  106. }
  107. }
  108. &-head {
  109. margin-left: $spacing-timeline_item_head-marginLeft;
  110. }
  111. &-left {
  112. .#{$module}-item-content {
  113. left: $spacing-timeline_item_left_item_content-left;
  114. width: $width-timeline_item_left_item_content;
  115. text-align: left;
  116. }
  117. }
  118. &-right {
  119. .#{$module}-item-content {
  120. width: $width-timeline_item_right_item_content;
  121. margin: $spacing-timeline_item_right_item_content;
  122. text-align: right;
  123. }
  124. }
  125. }
  126. }
  127. &-center {
  128. .#{$module}-item {
  129. &-content-time {
  130. position: absolute;
  131. top: $spacing-timeline_time-top;
  132. margin-left: $spacing-timeline_item_content_time-marginLeft;
  133. width: $width-timeline_item_content_time;
  134. text-align: right;
  135. }
  136. }
  137. }
  138. &-right {
  139. .#{$module}-item-right {
  140. .#{$module}-item {
  141. &-tail,
  142. &-head,
  143. &-head-custom {
  144. left: $spacing-timeline_item_right_item-left;
  145. }
  146. &-content {
  147. width: $width-timeline_item_right_content;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. @import './rtl.scss';