timeline-item.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. @use 'mixins/mixins' as *;
  2. @use 'common/var' as *;
  3. @include b(timeline-item) {
  4. position: relative;
  5. padding-bottom: 20px;
  6. @include e(wrapper) {
  7. position: relative;
  8. padding-left: 28px;
  9. top: -3px;
  10. }
  11. @include e(tail) {
  12. position: absolute;
  13. left: 4px;
  14. height: 100%;
  15. border-left: 2px solid getCssVar('timeline-node-color');
  16. }
  17. & .#{$namespace}-timeline-item__icon {
  18. color: getCssVar('color-white');
  19. font-size: getCssVar('font-size-small');
  20. }
  21. @include e(node) {
  22. position: absolute;
  23. background-color: getCssVar('timeline-node-color');
  24. border-color: getCssVar('timeline-node-color');
  25. border-radius: 50%;
  26. box-sizing: border-box;
  27. display: flex;
  28. justify-content: center;
  29. align-items: center;
  30. @include m(normal) {
  31. left: -1px;
  32. width: getCssVar('timeline-node-size-normal');
  33. height: getCssVar('timeline-node-size-normal');
  34. }
  35. @include m(large) {
  36. left: -2px;
  37. width: getCssVar('timeline-node-size-large');
  38. height: getCssVar('timeline-node-size-large');
  39. }
  40. @include when(hollow) {
  41. background: getCssVar('color-white');
  42. border-style: solid;
  43. border-width: 2px;
  44. }
  45. @each $type in (primary, success, warning, danger, info) {
  46. @include m($type) {
  47. background-color: getCssVar('color', $type);
  48. border-color: getCssVar('color', $type);
  49. }
  50. }
  51. }
  52. @include e(dot) {
  53. position: absolute;
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. }
  58. @include e(content) {
  59. color: getCssVar('text-color', 'primary');
  60. }
  61. @include e(timestamp) {
  62. color: getCssVar('text-color', 'secondary');
  63. line-height: 1;
  64. font-size: getCssVar('font-size-small');
  65. @include when(top) {
  66. margin-bottom: 8px;
  67. padding-top: 4px;
  68. }
  69. @include when(bottom) {
  70. margin-top: 8px;
  71. }
  72. }
  73. }