timeline-item.scss 1.9 KB

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