github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/styles/core/table.scss (about)

     1  .table {
     2    color: $text;
     3    border-radius: $radius;
     4    border: 1px solid $grey-blue;
     5    border-collapse: separate;
     6  
     7    &.is-fixed {
     8      table-layout: fixed;
     9  
    10      td {
    11        text-overflow: ellipsis;
    12        overflow: hidden;
    13      }
    14    }
    15  
    16    &.with-foot {
    17      margin-bottom: 0;
    18      border-bottom-left-radius: 0;
    19      border-bottom-right-radius: 0;
    20  
    21      + .table-foot {
    22        margin-bottom: 1.5rem;
    23      }
    24    }
    25  
    26    &.is-compact {
    27      th,
    28      td {
    29        padding: 0.75em;
    30      }
    31    }
    32  
    33    &.is-darkened {
    34      tbody tr:not(.is-selected) {
    35        background-color: $white-bis;
    36  
    37        &:hover {
    38          background-color: $white-ter;
    39        }
    40      }
    41  
    42      &.is-striped {
    43        tbody tr:not(.is-selected) {
    44          &:nth-child(even) {
    45            background-color: $white-ter;
    46  
    47            &:hover {
    48              background-color: darken($white-ter, 5%);
    49            }
    50          }
    51        }
    52      }
    53    }
    54  
    55    th,
    56    td {
    57      padding: 0.75em 1.5em;
    58      border: none;
    59  
    60      &.is-three-quarters {
    61        width: 75%;
    62      }
    63  
    64      &.is-two-thirds {
    65        width: 66.66%;
    66      }
    67  
    68      &.is-half {
    69        width: 50%;
    70      }
    71  
    72      &.is-one-third {
    73        width: 33.33%;
    74      }
    75  
    76      &.is-one-quarter {
    77        width: 25%;
    78      }
    79  
    80      // Only use px modifiers when text needs to be truncated.
    81      // In this and only this scenario are percentages not effective.
    82      &.is-200px {
    83        width: 200px;
    84        max-width: 200px;
    85      }
    86  
    87      &.is-truncatable {
    88        overflow: hidden;
    89        text-overflow: ellipsis;
    90        white-space: nowrap;
    91      }
    92  
    93      @for $i from 1 through 11 {
    94        &.is-#{$i} {
    95          width: 100% / 12 * $i;
    96          max-width: 100% / 12 * $i;
    97        }
    98      }
    99  
   100      a {
   101        color: $blue;
   102        text-decoration: underline;
   103        font-weight: $weight-normal;
   104  
   105        &.is-primary {
   106          color: $text;
   107          text-decoration: none;
   108          font-weight: $weight-semibold;
   109        }
   110      }
   111    }
   112  
   113    thead {
   114      background: $white-ter;
   115      border: 1px solid $grey-blue;
   116  
   117      tr {
   118        &:hover {
   119          background-color: inherit;
   120        }
   121      }
   122  
   123      td,
   124      th {
   125        color: $grey-light;
   126        font-weight: $weight-normal;
   127        vertical-align: bottom;
   128        border-bottom: 1px solid $grey-blue;
   129  
   130        &.is-selectable {
   131          padding: 0;
   132  
   133          a {
   134            display: block;
   135            padding: 0.75em 1.5em;
   136            width: 100%;
   137            text-decoration: none;
   138  
   139            &:hover {
   140              background-color: darken($white-ter, 5%);
   141            }
   142          }
   143        }
   144  
   145        &.is-active {
   146          position: relative;
   147  
   148          &::after {
   149            content: "";
   150            width: 10px;
   151            right: 1.5em;
   152            top: 0.75em;
   153            bottom: 0.75em;
   154            position: absolute;
   155            display: block;
   156          }
   157  
   158          &.asc::after {
   159            content: "⬇";
   160          }
   161  
   162          &.desc::after {
   163            content: "⬆";
   164          }
   165        }
   166  
   167        a {
   168          color: $grey;
   169        }
   170      }
   171    }
   172  
   173    tbody {
   174      tr {
   175        &.is-interactive {
   176          cursor: pointer;
   177          box-sizing: border-box;
   178        }
   179  
   180        &.is-active {
   181          background: rgba($blue, 0.1);
   182  
   183          td:first-child {
   184            position: relative;
   185  
   186            &::after {
   187              position: absolute;
   188              content: "";
   189              width: 3px;
   190              top: 0;
   191              bottom: 0;
   192              left: -1px;
   193              display: block;
   194              background: $blue;
   195            }
   196          }
   197        }
   198      }
   199  
   200      td.is-subheading {
   201        font-weight: $weight-bold;
   202        background: $white;
   203        color: $blue;
   204      }
   205  
   206      td {
   207        border: 1px solid $grey-blue;
   208        border-width: 0 0 1px;
   209        padding: 1.25em 1.5em;
   210      }
   211    }
   212  
   213    .is-faded {
   214      color: $grey-light;
   215    }
   216  }
   217  
   218  .table tfoot,
   219  .table-foot {
   220    margin-top: -1px;
   221    background: $white-ter;
   222    border: 1px solid $grey-blue;
   223    border-bottom-right-radius: $radius;
   224    border-bottom-left-radius: $radius;
   225    overflow: hidden;
   226  
   227    .pagination {
   228      padding: 0;
   229      margin: 0;
   230    }
   231  }