_timeline.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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, ol, ul {
  71. margin: 0;
  72. }
  73. }
  74. > .timeline-footer {
  75. > a {
  76. color: $white;
  77. }
  78. }
  79. }
  80. // The icons at line
  81. > .fa,
  82. > .fas,
  83. > .far,
  84. > .fab,
  85. > .glyphicon,
  86. > .ion {
  87. background: $gray-500;
  88. border-radius: 50%;
  89. font-size: 15px;
  90. height: 30px;
  91. left: 18px;
  92. line-height: 30px;
  93. position: absolute;
  94. text-align: center;
  95. top: 0;
  96. width: 30px;
  97. }
  98. }
  99. // Time label
  100. > .time-label {
  101. > span {
  102. @include border-radius(4px);
  103. background-color: $white;
  104. display: inline-block;
  105. font-weight: 600;
  106. padding: 5px;
  107. }
  108. }
  109. }
  110. .timeline-inverse {
  111. > div {
  112. > .timeline-item {
  113. @include box-shadow(none);
  114. background: $gray-100;
  115. border: 1px solid $gray-300;
  116. > .timeline-header {
  117. border-bottom-color: $gray-300;
  118. }
  119. }
  120. }
  121. }