eliace/ergo-js

View on GitHub
css/widgets/basic/table.less

Summary

Maintainability
Test Coverage


.table td {
  padding: 0.5714rem;
}

.table th {
  color: @text-color;
  font-weight: 700;
    padding: 0.5714rem;
  text-align: left;
}




.table.box {

    .bordered;

//    tr:not(:last) td {
      // border-top: 1px solid #ddd;
      // border-bottom: none;
//    }

    th {
      border-bottom: 1px solid #ddd;
      background-color: #f4f4f4;
    }



}




.table.list-view {

    td {
      padding:  0.8571rem;
    }

    th {
      color: #ccc;
      text-transform: uppercase;
      font-size: 0.8571em;
    }

}


.table {

//    margin-top: 1rem;


    tr {
        color: @text-color;
    }


    tr:not(:last-of-type) > td {
      border-bottom: 1px solid #ddd;
    }


    tr.disabled {
        color: @disabled-color;
    }


  // th.resizable {
  //     position: relative;
  // }

  tr.resize {
    cursor: col-resize;
  }


    // tr.box.error > td {
    //     .box-type(@danger);
    // }

    // tr.text.error > td {
    //     .text-type(@danger);
    // }



    &.celled {
        tr > td + td, tr > th + th {
            border-left: 1px solid #ddd;
        }
    }

    &.striped > tbody {
        tr:nth-child(odd) {
            background-color: @stripe-color;
        }
    }

    &.hovered > tbody {
        tr:hover {
            background-color: rgba(0,0,0,0.03);//@hover-color;
        }
    }


    &.fluid {
        width: 100%;
    }


    &.single-line {
        td {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }


    &.grid {

        > .grid-header {
            background-color: #f4f4f4; /* #34495e;*/
//            color: #888;
            min-height: 34px;
            overflow-x: hidden;
        }

        > .grid-content > table {
            width: 100%;
            table-layout: fixed;
        }

        > .grid-header > table {
            width: 100%;
            table-layout: fixed;
        }


/*
        .grid-box td {
            border-bottom: 1px solid #ddd;
            padding: 3px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .grid-box th {
            padding: 0 0 0 3px;
            border-right: 1px solid #ddd;
            font-weight: bold;
            text-align: left;
        }
*/
    }



}