Graphs and tables for your Spotify account.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

187 lines
3.4 KiB

  1. //
  2. // Basic Bootstrap table
  3. //
  4. .table {
  5. width: 100%;
  6. margin-bottom: $spacer;
  7. background-color: $table-bg; // Reset for nesting within parents with `background-color`.
  8. th,
  9. td {
  10. padding: $table-cell-padding;
  11. vertical-align: top;
  12. border-top: $table-border-width solid $table-border-color;
  13. }
  14. thead th {
  15. vertical-align: bottom;
  16. border-bottom: (2 * $table-border-width) solid $table-border-color;
  17. }
  18. tbody + tbody {
  19. border-top: (2 * $table-border-width) solid $table-border-color;
  20. }
  21. .table {
  22. background-color: $body-bg;
  23. }
  24. }
  25. //
  26. // Condensed table w/ half padding
  27. //
  28. .table-sm {
  29. th,
  30. td {
  31. padding: $table-cell-padding-sm;
  32. }
  33. }
  34. // Border versions
  35. //
  36. // Add or remove borders all around the table and between all the columns.
  37. .table-bordered {
  38. border: $table-border-width solid $table-border-color;
  39. th,
  40. td {
  41. border: $table-border-width solid $table-border-color;
  42. }
  43. thead {
  44. th,
  45. td {
  46. border-bottom-width: (2 * $table-border-width);
  47. }
  48. }
  49. }
  50. .table-borderless {
  51. th,
  52. td,
  53. thead th,
  54. tbody + tbody {
  55. border: 0;
  56. }
  57. }
  58. // Zebra-striping
  59. //
  60. // Default zebra-stripe styles (alternating gray and transparent backgrounds)
  61. .table-striped {
  62. tbody tr:nth-of-type(#{$table-striped-order}) {
  63. background-color: $table-accent-bg;
  64. }
  65. }
  66. // Hover effect
  67. //
  68. // Placed here since it has to come after the potential zebra striping
  69. .table-hover {
  70. tbody tr {
  71. @include hover {
  72. background-color: $table-hover-bg;
  73. }
  74. }
  75. }
  76. // Table backgrounds
  77. //
  78. // Exact selectors below required to override `.table-striped` and prevent
  79. // inheritance to nested tables.
  80. @each $color, $value in $theme-colors {
  81. @include table-row-variant($color, theme-color-level($color, -9));
  82. }
  83. @include table-row-variant(active, $table-active-bg);
  84. // Dark styles
  85. //
  86. // Same table markup, but inverted color scheme: dark background and light text.
  87. // stylelint-disable-next-line no-duplicate-selectors
  88. .table {
  89. .thead-dark {
  90. th {
  91. color: $table-dark-color;
  92. background-color: $table-dark-bg;
  93. border-color: $table-dark-border-color;
  94. }
  95. }
  96. .thead-light {
  97. th {
  98. color: $table-head-color;
  99. background-color: $table-head-bg;
  100. border-color: $table-border-color;
  101. }
  102. }
  103. }
  104. .table-dark {
  105. color: $table-dark-color;
  106. background-color: $table-dark-bg;
  107. th,
  108. td,
  109. thead th {
  110. border-color: $table-dark-border-color;
  111. }
  112. &.table-bordered {
  113. border: 0;
  114. }
  115. &.table-striped {
  116. tbody tr:nth-of-type(odd) {
  117. background-color: $table-dark-accent-bg;
  118. }
  119. }
  120. &.table-hover {
  121. tbody tr {
  122. @include hover {
  123. background-color: $table-dark-hover-bg;
  124. }
  125. }
  126. }
  127. }
  128. // Responsive tables
  129. //
  130. // Generate series of `.table-responsive-*` classes for configuring the screen
  131. // size of where your table will overflow.
  132. .table-responsive {
  133. @each $breakpoint in map-keys($grid-breakpoints) {
  134. $next: breakpoint-next($breakpoint, $grid-breakpoints);
  135. $infix: breakpoint-infix($next, $grid-breakpoints);
  136. &#{$infix} {
  137. @include media-breakpoint-down($breakpoint) {
  138. display: block;
  139. width: 100%;
  140. overflow-x: auto;
  141. -webkit-overflow-scrolling: touch;
  142. -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
  143. // Prevent double border on horizontal scroll due to use of `display: block;`
  144. > .table-bordered {
  145. border: 0;
  146. }
  147. }
  148. }
  149. }
  150. }