@use '../bootstrap/init' as *;

//
//
// Apply partially
//   https://github.com/twbs/bootstrap/blob/v4.5.0/scss/_tables.scss
//
//

.table {
  color: $table-color;
  background-color: $table-bg; // Reset for nesting within parents with `background-color`.

  th,
  td {
    border-top-color: $table-border-color;
  }

  thead th {
    border-bottom-color: $table-border-color;
  }

  tbody + tbody {
    border-top-color: $table-border-color;
  }
}

.table-bordered {
  border-color: $table-border-color;

  th,
  td {
    border-color: $table-border-color;
  }
}

.table-hover {
  tbody tr {
    @include hover() {
      color: $table-hover-color;
      background-color: $table-hover-bg;
    }
  }
}

.table-dark {
  color: $table-dark-color;
  background-color: $table-dark-bg;

  th,
  td,
  thead th {
    border-color: $table-dark-border-color;
  }

  &.table-bordered {
    border: 0;
  }

  &.table-striped {
    tbody tr:nth-of-type(#{$table-striped-order}) {
      background-color: $table-dark-accent-bg;
    }
  }

  &.table-hover {
    tbody tr {
      @include hover() {
        color: $table-dark-hover-color;
        background-color: $table-dark-hover-bg;
      }
    }
  }
}
