_timeline.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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-color: $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-color: $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. /* stylelint-disable selector-class-pattern */
  83. // The icons at line
  84. > .fa,
  85. > .fas,
  86. > .far,
  87. > .fab,
  88. > .fal,
  89. > .fad,
  90. > .svg-inline--fa,
  91. > .ion {
  92. background-color: $gray-500;
  93. border-radius: 50%;
  94. font-size: 16px;
  95. height: 30px;
  96. left: 18px;
  97. line-height: 30px;
  98. position: absolute;
  99. text-align: center;
  100. top: 0;
  101. width: 30px;
  102. }
  103. > .svg-inline--fa {
  104. padding: 7px;
  105. }
  106. /* stylelint-enable selector-class-pattern */
  107. }
  108. // Time label
  109. > .time-label {
  110. > span {
  111. @include border-radius(4px);
  112. background-color: $white;
  113. display: inline-block;
  114. font-weight: 600;
  115. padding: 5px;
  116. }
  117. }
  118. }
  119. .timeline-inverse {
  120. > div {
  121. > .timeline-item {
  122. @include box-shadow(none);
  123. background-color: $gray-100;
  124. border: 1px solid $gray-300;
  125. > .timeline-header {
  126. border-bottom-color: $gray-300;
  127. }
  128. }
  129. }
  130. }
  131. @include dark-mode () {
  132. .timeline {
  133. &::before {
  134. background-color: $gray-600;
  135. }
  136. > div > .timeline-item {
  137. background-color: $dark;
  138. color: $white;
  139. border-color: $gray-600;
  140. > .timeline-header {
  141. color: $gray-400;
  142. border-color: $gray-600;
  143. }
  144. > .time {
  145. color: $gray-400;
  146. }
  147. }
  148. }
  149. }