Skip to content
Snippets Groups Projects
tables.scss 936 B
Newer Older
Patrick Marsceill's avatar
Patrick Marsceill committed
//
// Tables
//
Patrick Marsceill's avatar
Patrick Marsceill committed
// stylelint-disable max-nesting-depth, selector-no-type, selector-max-type
Patrick Marsceill's avatar
Patrick Marsceill committed

.table-wrapper {
Patrick Marsceill's avatar
Patrick Marsceill committed
  display: block;
Patrick Marsceill's avatar
Patrick Marsceill committed
  width: 100%;
Patrick Marsceill's avatar
Patrick Marsceill committed
  max-width: 100%;
Patrick Marsceill's avatar
Patrick Marsceill committed
  margin-bottom: $sp-5;
Patrick Marsceill's avatar
Patrick Marsceill committed
  overflow-x: auto;
  border-radius: $border-radius;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
Patrick Marsceill's avatar
Patrick Marsceill committed

table {
  display: table;
  min-width: 100%;
  border-collapse: separate;
Patrick Marsceill's avatar
Patrick Marsceill committed
}

th,
td {
  @include fs-3;
Patrick Marsceill's avatar
Patrick Marsceill committed
  min-width: 120px;
Patrick Marsceill's avatar
Patrick Marsceill committed
  padding-top: $sp-2;
  padding-right: $sp-3;
Patrick Marsceill's avatar
Patrick Marsceill committed
  padding-bottom: $sp-2;
  padding-left: $sp-3;
  background-color: $table-background-color;
  border-bottom: $border rgba($border-color, 0.5);
Patrick Marsceill's avatar
Patrick Marsceill committed
  border-left: $border $border-color;

  &:first-of-type {
    border-left: 0;
  }
}

tbody {
  tr {
    &:last-of-type {
      th,
      td {
        border-bottom: 0;
      }

      td {
        padding-bottom: $sp-3;
      }
Patrick Marsceill's avatar
Patrick Marsceill committed
    }
  }
}

thead {
  th {
    border-bottom: $border $border-color;
Patrick Marsceill's avatar
Patrick Marsceill committed
  }
}