_timeline.scss 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // Timeline
  3. //
  4. .timeline {
  5. --#{$prefix}timeline-icon-size: #{$avatar-size};
  6. position: relative;
  7. list-style: none;
  8. padding: 0;
  9. }
  10. //
  11. // Timeline event
  12. //
  13. .timeline-event {
  14. position: relative;
  15. &:not(:last-child) {
  16. margin-bottom: var(--#{$prefix}page-padding);
  17. &:before {
  18. content: "";
  19. position: absolute;
  20. top: var(--#{$prefix}timeline-icon-size);
  21. left: calc(var(--#{$prefix}timeline-icon-size) / 2);
  22. bottom: calc(-1 * var(--#{$prefix}page-padding));
  23. width: var(--#{$prefix}border-width);
  24. background-color: var(--#{$prefix}border-color);
  25. border-radius: var(--#{$prefix}border-radius);
  26. }
  27. }
  28. }
  29. .timeline-event-icon {
  30. position: absolute;
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. width: var(--#{$prefix}timeline-icon-size, $avatar-size);
  35. height: var(--#{$prefix}timeline-icon-size, $avatar-size);
  36. background: var(--#{$prefix}gray-200);
  37. color: var(--#{$prefix}secondary);
  38. border-radius: var(--#{$prefix}border-radius);
  39. z-index: 5
  40. }
  41. .timeline-event-card {
  42. margin-left: calc(var(--#{$prefix}timeline-icon-size, $avatar-size) + var(--#{$prefix}page-padding));
  43. }
  44. //
  45. // Simple timeline
  46. //
  47. .timeline-simple {
  48. .timeline-event-icon {
  49. display: none;
  50. }
  51. .timeline-event-card {
  52. margin-left: 0;
  53. }
  54. }