github.com/thomasobenaus/nomad@v0.11.1/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    width: 100%;
     7  
     8    &.is-fixed {
     9      table-layout: fixed;
    10  
    11      td {
    12        text-overflow: ellipsis;
    13        overflow: hidden;
    14      }
    15    }
    16  
    17    &.is-isolated {
    18      margin-bottom: 0;
    19    }
    20  
    21    &.with-foot {
    22      margin-bottom: 0;
    23      border-bottom-left-radius: 0;
    24      border-bottom-right-radius: 0;
    25  
    26      + .table-foot {
    27        margin-bottom: 1.5rem;
    28      }
    29    }
    30  
    31    &.is-compact {
    32      th,
    33      td {
    34        padding: 0.75em;
    35      }
    36  
    37      .is-selectable a {
    38        padding: 0.75em;
    39      }
    40    }
    41  
    42    &.is-darkened {
    43      tbody tr:not(.is-selected) {
    44        background-color: $white-bis;
    45  
    46        &:hover {
    47          background-color: $white-ter;
    48        }
    49      }
    50  
    51      &.is-striped {
    52        tbody tr:not(.is-selected) {
    53          &:nth-child(even) {
    54            background-color: $white-ter;
    55  
    56            &:hover {
    57              background-color: darken($white-ter, 5%);
    58            }
    59          }
    60        }
    61      }
    62    }
    63  
    64    th,
    65    td {
    66      padding: 0.75em 1.5em;
    67      border: none;
    68  
    69      &.is-three-quarters {
    70        width: 75%;
    71      }
    72  
    73      &.is-two-thirds {
    74        width: 66.66%;
    75      }
    76  
    77      &.is-half {
    78        width: 50%;
    79      }
    80  
    81      &.is-one-third {
    82        width: 33.33%;
    83      }
    84  
    85      &.is-one-quarter {
    86        width: 25%;
    87      }
    88  
    89      &.is-truncatable {
    90        overflow: hidden;
    91        text-overflow: ellipsis;
    92        white-space: nowrap;
    93      }
    94  
    95      &.is-narrow {
    96        padding: 1.25em 0 1.25em 0.5em;
    97  
    98        & + th,
    99        & + td {
   100          padding-left: 0.5em;
   101        }
   102      }
   103  
   104      // Only use px modifiers when text needs to be truncated.
   105      // In this and only this scenario are percentages not effective.
   106      &.is-200px {
   107        width: 200px;
   108        max-width: 200px;
   109      }
   110  
   111      @for $i from 1 through 11 {
   112        &.is-#{$i} {
   113          width: 100% / 12 * $i;
   114          max-width: 100% / 12 * $i;
   115        }
   116      }
   117  
   118      a {
   119        color: $blue;
   120        text-decoration: underline;
   121        font-weight: $weight-normal;
   122  
   123        &.is-primary {
   124          color: $text;
   125          text-decoration: none;
   126          font-weight: $weight-semibold;
   127        }
   128      }
   129    }
   130  
   131    thead {
   132      background: $white-ter;
   133      border: 1px solid $grey-blue;
   134  
   135      tr {
   136        &:hover {
   137          background-color: inherit;
   138        }
   139      }
   140  
   141      td,
   142      th {
   143        color: $grey-light;
   144        font-weight: $weight-normal;
   145        vertical-align: bottom;
   146        border-bottom: 1px solid $grey-blue;
   147  
   148        &.is-selectable {
   149          padding: 0;
   150  
   151          a {
   152            display: block;
   153            padding: 0.75em 1.5em;
   154            width: 100%;
   155            text-decoration: none;
   156            position: relative;
   157  
   158            &:hover {
   159              background-color: darken($white-ter, 5%);
   160            }
   161  
   162            &::before,
   163            &::after {
   164              position: absolute;
   165              pointer-events: none;
   166              color: $grey-light;
   167            }
   168  
   169            &::after {
   170              transform: translateX(6px);
   171            }
   172  
   173            &::before {
   174              transform: translateX(-20px);
   175            }
   176          }
   177        }
   178  
   179        &.is-active {
   180          &.desc a::after {
   181            content: '⬆';
   182          }
   183  
   184          &.asc a::after {
   185            content: '⬇';
   186          }
   187  
   188          &.has-text-right {
   189            a::after {
   190              content: none;
   191            }
   192  
   193            &.desc a::before {
   194              content: '⬆';
   195            }
   196  
   197            &.asc a::before {
   198              content: '⬇';
   199            }
   200          }
   201        }
   202  
   203        a {
   204          color: $grey;
   205        }
   206      }
   207    }
   208  
   209    tbody {
   210      tr {
   211        &.is-interactive {
   212          cursor: pointer;
   213          box-sizing: border-box;
   214        }
   215  
   216        &.is-active {
   217          background: rgba($blue, 0.1);
   218  
   219          td:first-child {
   220            position: relative;
   221  
   222            &::after {
   223              position: absolute;
   224              content: '';
   225              width: 3px;
   226              top: 0;
   227              bottom: 0;
   228              left: -1px;
   229              display: block;
   230              background: $blue;
   231            }
   232          }
   233        }
   234      }
   235  
   236      td.is-subheading {
   237        font-weight: $weight-bold;
   238        background: $white;
   239        color: $blue;
   240      }
   241  
   242      td {
   243        border: 1px solid $grey-blue;
   244        border-width: 0 0 1px;
   245        padding: 1.25em 1.5em;
   246  
   247        &.is-one-line {
   248          white-space: nowrap;
   249        }
   250      }
   251    }
   252  
   253    .is-faded {
   254      color: $grey-light;
   255    }
   256  }
   257  
   258  .table tfoot,
   259  .table-foot {
   260    margin-top: -1px;
   261    background: $white-ter;
   262    border: 1px solid $grey-blue;
   263    border-bottom-right-radius: $radius;
   264    border-bottom-left-radius: $radius;
   265    overflow: hidden;
   266    display: flex;
   267    justify-content: space-between;
   268    align-items: center;
   269  
   270    .pagination {
   271      padding: 0;
   272      margin: 0;
   273    }
   274  
   275    // Field overrides specifically for use of Field within a table foot.
   276    // Bulma does a lot of typically helpful layout tweaks at different
   277    // breakpoints that are undesirable in this context.
   278    .field {
   279      margin-bottom: 0;
   280  
   281      &:first-child {
   282        margin-left: 1.5em;
   283      }
   284  
   285      &.is-horizontal {
   286        display: flex;
   287      }
   288  
   289      .label,
   290      .field-label {
   291        color: $grey;
   292        flex-basis: 0;
   293        flex-grow: 1;
   294        flex-shrink: 0;
   295        text-align: right;
   296  
   297        &.is-small {
   298          font-size: $size-7;
   299        }
   300      }
   301  
   302      .field-body {
   303        display: flex;
   304        flex-basis: 0;
   305        flex-grow: 5;
   306        flex-shrink: 1;
   307      }
   308    }
   309  }