PascalKleindienst/consola.css

View on GitHub
scss/_tables.scss

Summary

Maintainability
Test Coverage
// Default table style
.table {
  margin-bottom: 1.65rem;
  width: 100%;
  max-width: 100%;

  thead {
    th {
      border-bottom: 1px dashed $dark-font-color;
      text-align: left;
    }
  }

  th,
  td {
    padding: .25rem;
    line-height: 1;
    word-wrap: normal;
  }
}

// Add border around table
.table-bordered {
  margin-top: .25rem;
  border-top: 1px dashed $dark-font-color;
  border-bottom: 1px dashed $dark-font-color;

  thead {
    th {
      padding-bottom: .4rem;
    }
  }

  // add | border between columns
  td,
  th {
    &::before {
      float: left;
      padding: 0 .5rem;
      margin-left: -.5rem;
      font-weight: normal;
      content: '|';
    }

    &:first-child::before {
      margin-left: -1rem;
    }

    &:last-child::after {
      float: right;
      padding-left: .5rem;
      font-weight: normal;
      content: '|';
      margin-right: -.5rem;
    }
  }
}

// Table Grid border
.table-grid {
  @extend .table-bordered;
  
  border-bottom: 0;

  th,
  td {
    border-bottom: 1px dashed $dark-font-color;
  }

}