_timeline.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. //
  2. // Component: Timeline
  3. //
  4. .timeline {
  5. margin: 0 0 45px;
  6. padding: 0;
  7. position: relative;
  8. // The line
  9. &::before {
  10. @include border-radius($border-radius);
  11. background: $gray-300;
  12. bottom: 0;
  13. content: "";
  14. left: 31px;
  15. margin: 0;
  16. position: absolute;
  17. top: 0;
  18. width: 4px;
  19. }
  20. // Element
  21. > div {
  22. &::before,
  23. &::after {
  24. content: "";
  25. display: table;
  26. }
  27. margin-bottom: 15px;
  28. margin-right: 10px;
  29. position: relative;
  30. // The content
  31. > .timeline-item {
  32. @include box-shadow($card-shadow);
  33. @include border-radius($border-radius);
  34. background: $white;
  35. color: $gray-700;
  36. margin-left: 60px;
  37. margin-right: 15px;
  38. margin-top: 0;
  39. padding: 0;
  40. position: relative;
  41. // The time and header
  42. > .time {
  43. color: #999;
  44. float: right;
  45. font-size: 12px;
  46. padding: 10px;
  47. }
  48. // Header
  49. > .timeline-header {
  50. border-bottom: 1px solid $card-border-color;
  51. color: $gray-700;
  52. font-size: 16px;
  53. line-height: 1.1;
  54. margin: 0;
  55. padding: 10px;
  56. // Link in header
  57. > a {
  58. font-weight: 600;
  59. }
  60. }
  61. // Item body and footer
  62. > .timeline-body,
  63. > .timeline-footer {
  64. padding: 10px;
  65. }
  66. > .timeline-body {
  67. > img {
  68. margin: 10px;
  69. }
  70. > dl,
  71. ol,
  72. ul {
  73. margin: 0;
  74. }
  75. }
  76. > .timeline-footer {
  77. > a {
  78. color: $white;
  79. }
  80. }
  81. }
  82. // The icons at line
  83. > .fa,
  84. > .fas,
  85. > .far,
  86. > .fab,
  87. > .ion {
  88. background: $gray-500;
  89. border-radius: 50%;
  90. font-size: 15px;
  91. height: 30px;
  92. left: 18px;
  93. line-height: 30px;
  94. position: absolute;
  95. text-align: center;
  96. top: 0;
  97. width: 30px;
  98. }
  99. }
  100. // Time label
  101. > .time-label {
  102. > span {
  103. @include border-radius(4px);
  104. background-color: $white;
  105. display: inline-block;
  106. font-weight: 600;
  107. padding: 5px;
  108. }
  109. }
  110. }
  111. .timeline-inverse {
  112. > div {
  113. > .timeline-item {
  114. @include box-shadow(none);
  115. background: $gray-100;
  116. border: 1px solid $gray-300;
  117. > .timeline-header {
  118. border-bottom-color: $gray-300;
  119. }
  120. }
  121. }
  122. }