nemesiscodex/openfonacide

View on GitHub
static/components/table.css

Summary

Maintainability
Test Coverage
/*!
 * # Semantic UI 1.12.3 - Table
 * http://github.com/semantic-org/semantic-ui/
 *
 *
 * Copyright 2014 Contributors
 * Released under the MIT license
 * http://opensource.org/licenses/MIT
 *
 */


/*******************************
             Table
*******************************/


/* Prototype */
.ui.table {
  width: 100%;
  background: #ffffff;
  margin: 1em 0em;
  border: 1px solid #d0d0d0;
  box-shadow: none;
  border-radius: 0.25rem;
  color: rgba(0, 0, 0, 0.8);
  border-collapse: separate;
  border-spacing: 0px;
}
.ui.table:first-child {
  margin-top: 0em;
}
.ui.table:last-child {
  margin-bottom: 0em;
}


/*******************************
             Parts
*******************************/


/* Table Content */
.ui.table th,
.ui.table td {
  -webkit-transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
          transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Headers */
.ui.table thead {
  box-shadow: none;
}
.ui.table thead th {
  cursor: auto;
  background: #f0f0f0;
  text-align: left;
  color: rgba(0, 0, 0, 0.8);
  padding: 0.7em 0.8em;
  vertical-align: middle;
  font-style: none;
  font-weight: bold;
  text-transform: none;
  border-bottom: 1px solid #d4d4d5;
  border-left: none;
}
.ui.table thead tr > th:first-child {
  border-left: none;
}
.ui.table thead tr:first-child > th:first-child {
  border-radius: 0.25rem 0em 0em 0em;
}
.ui.table thead tr:first-child > th:last-child {
  border-radius: 0em 0.25rem 0em 0em;
}
.ui.table thead tr:first-child > th:only-child {
  border-radius: 0.25rem 0.25rem 0em 0em;
}

/* Footer */
.ui.table tfoot {
  box-shadow: none;
}
.ui.table tfoot th {
  cursor: auto;
  border-top: 1px solid #d4d4d5;
  background: #ffffff;
  text-align: left;
  color: rgba(0, 0, 0, 0.8);
  padding: 0.7em 0.8em;
  vertical-align: middle;
  font-style: normal;
  font-weight: normal;
  text-transform: none;
}
.ui.table tfoot tr > th:first-child {
  border-left: none;
}
.ui.table tfoot tr:first-child > th:first-child {
  border-radius: 0em 0em 0em 0.25rem;
}
.ui.table tfoot tr:first-child > th:last-child {
  border-radius: 0em 0em 0.25rem 0em;
}
.ui.table tfoot tr:first-child > th:only-child {
  border-radius: 0em 0em 0.25rem 0.25rem;
}

/* Table Row */
.ui.table tr td {
  border-top: 1px solid #d4d4d5;
}
.ui.table tr:first-child td {
  border-top: none;
}

/* Table Cells */
.ui.table td {
  padding: 0.7em 0.8em;
  text-align: left;
  vertical-align: middle;
}

/* Icons */
.ui.table > .icon {
  vertical-align: baseline;
}
.ui.table > .icon:only-child {
  margin: 0em;
}

/* Table Segment */
.ui.table.segment {
  padding: 0em;
}
.ui.table.segment:after {
  display: none;
}
.ui.table.segment.stacked:after {
  display: block;
}

/* Responsive */
@media only screen and (max-width: 767px) {
  .ui.table:not(.unstackable) {
    width: 100%;
  }
  .ui.table:not(.unstackable) tbody,
  .ui.table:not(.unstackable) tr,
  .ui.table:not(.unstackable) tr > th,
  .ui.table:not(.unstackable) tr > td {
    width: auto !important;
    display: block !important;
  }
  .ui.table:not(.unstackable) {
    padding: 0em;
  }
  .ui.table:not(.unstackable) thead {
    display: block;
  }
  .ui.table:not(.unstackable) tfoot {
    display: block;
  }
  .ui.table:not(.unstackable) tr > th,
  .ui.table:not(.unstackable) tr > td {
    background: none;
    border: none !important;
    padding: 0.25em 0.75em;
    box-shadow: none !important;
  }
  .ui.table:not(.unstackable) th:first-child,
  .ui.table:not(.unstackable) td:first-child {
    font-weight: bold;
    padding-top: 1em;
  }
  .ui.table:not(.unstackable) th:last-child,
  .ui.table:not(.unstackable) td:last-child {
    box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset !important;
    padding-bottom: 1em;
  }
  
/* Clear BG Colors */
  .ui.table:not(.unstackable) tr > td.warning,
  .ui.table:not(.unstackable) tr > td.error,
  .ui.table:not(.unstackable) tr > td.active,
  .ui.table:not(.unstackable) tr > td.positive,
  .ui.table:not(.unstackable) tr > td.negative {
    background-color: transparent !important;
  }
  
/* Definition Table */
  .ui.definition.table:not(.unstackable) thead th:first-child {
    box-shadow: none !important;
  }
  .ui.definition.table:not(.unstackable) tr td:first-child {
    padding-bottom: 1em;
  }
  .ui.definition.table:not(.unstackable) tr td:nth-child(n+2) {
    padding-top: 1em;
  }
}


/*******************************
            Coupling
*******************************/


/* UI Image */
.ui.table th .image,
.ui.table th .image img,
.ui.table td .image,
.ui.table td .image img {
  max-width: none;
}


/*******************************
             Types
*******************************/


/*--------------
    Complex
---------------*/

.ui.structured.table {
  border-collapse: collapse;
}
.ui.structured.table thead th {
  border-left: none;
  border-right: none;
}
.ui.structured.sortable.table thead th {
  border-left: 1px solid #d0d0d0;
  border-right: 1px solid #d0d0d0;
}
.ui.structured.basic.table th {
  border-left: none;
  border-right: none;
}
.ui.structured.celled.table tr th,
.ui.structured.celled.table tr td {
  border-left: 1px solid #d4d4d5;
  border-right: 1px solid #d4d4d5;
}

/*--------------
   Definition
---------------*/

.ui.definition.table thead:not(.full-width) th:first-child {
  pointer-events: none;
  background: transparent;
  font-weight: normal;
  color: rgba(0, 0, 0, 0.4);
  box-shadow: -1px -1px 0px 1px #ffffff;
}
.ui.definition.table tfoot:not(.full-width) th:first-child {
  pointer-events: none;
  background: transparent;
  font-weight: rgba(0, 0, 0, 0.4);
  color: normal;
  box-shadow: 1px 1px 0px 1px #ffffff;
}

/* Remove Border */
.ui.celled.definition.table thead:not(.full-width) th:first-child {
  box-shadow: 0px -1px 0px 1px #ffffff;
}
.ui.celled.definition.table tfoot:not(.full-width) th:first-child {
  box-shadow: 0px 1px 0px 1px #ffffff;
}

/* Highlight Defining Column */
.ui.definition.table tr td:first-child {
  background: rgba(0, 0, 0, 0.03);
  font-weight: bold;
  color: rgba(0, 0, 0, 0.8);
}

/* Fix 2nd Column */
.ui.definition.table thead:not(.full-width) th:nth-child(2) {
  border-left: 1px solid #d0d0d0;
}
.ui.definition.table tfoot:not(.full-width) th:nth-child(2) {
  border-left: 1px solid #d0d0d0;
}
.ui.definition.table td:nth-child(2) {
  border-left: 1px solid #d0d0d0;
}


/*******************************
             States
*******************************/


/*--------------
    Positive
---------------*/

.ui.table tr.positive,
.ui.table td.positive {
  box-shadow: 0px 0px 0px #b7caa7 inset;
}
.ui.table tr.positive td,
.ui.table td.positive {
  background: #eeffe7 !important;
  color: #3c763d !important;
}
.ui.celled.table tr.positive:hover td,
.ui.celled.table tr:hover td.positive {
  background: #e3ffd8 !important;
  color: #376c38 !important;
}

/*--------------
     Negative
---------------*/

.ui.table tr.negative,
.ui.table td.negative {
  box-shadow: 0px 0px 0px #dbb1b1 inset;
}
.ui.table tr.negative td,
.ui.table td.negative {
  background: #fff0f0 !important;
  color: #cd2929 !important;
}
.ui.celled.table tr.negative:hover td,
.ui.celled.table tr:hover td.negative {
  background: #ffe1e1 !important;
  color: #c02626 !important;
}

/*--------------
      Error
---------------*/

.ui.table tr.error,
.ui.table td.error {
  box-shadow: 0px 0px 0px #dbb1b1 inset;
}
.ui.table tr.error td,
.ui.table td.error {
  background: #fff0f0 !important;
  color: #cd2929 !important;
}
.ui.celled.table tr.error:hover td,
.ui.celled.table tr:hover td.error {
  background: #ffe1e1 !important;
  color: #c02626 !important;
}

/*--------------
     Warning
---------------*/

.ui.table tr.warning,
.ui.table td.warning {
  box-shadow: 0px 0px 0px #d9caab inset;
}
.ui.table tr.warning td,
.ui.table td.warning {
  background: #fffbe6 !important;
  color: #7d6c00 !important;
}
.ui.celled.table tr.warning:hover td,
.ui.celled.table tr:hover td.warning {
  background: #fff9d7 !important;
  color: #6e5f00 !important;
}

/*--------------
     Active
---------------*/

.ui.table tr.active,
.ui.table td.active {
  box-shadow: 0px 0px 0px rgba(50, 50, 50, 0.9) inset;
}
.ui.table tr.active td,
.ui.table td.active {
  background: #e0e0e0 !important;
  color: rgba(50, 50, 50, 0.9) !important;
}
.ui.celled.table tr.active:hover td,
.ui.celled.table tr:hover td.active {
  background: #e0e0e0 !important;
  color: rgba(50, 50, 50, 0.9) !important;
}

/*--------------
     Disabled
---------------*/

.ui.table tr.disabled td,
.ui.table tr td.disabled,
.ui.table tr.disabled:hover td,
.ui.table tr:hover td.disabled {
  pointer-events: none;
  color: rgba(40, 40, 40, 0.3);
}


/*******************************
          Variations
*******************************/


/*--------------
    Stackable
---------------*/

@media only screen and (max-width: 991px) {
  .ui[class*="tablet stackable"].table,
  .ui[class*="tablet stackable"].table tbody,
  .ui[class*="tablet stackable"].table tr,
  .ui[class*="tablet stackable"].table tr > th,
  .ui[class*="tablet stackable"].table tr > td {
    width: 100% !important;
    display: block !important;
  }
  .ui[class*="tablet stackable"].table {
    padding: 0em;
  }
  .ui[class*="tablet stackable"].table thead {
    display: block;
  }
  .ui[class*="tablet stackable"].table tfoot {
    display: block;
  }
  .ui[class*="tablet stackable"].table tr > th,
  .ui[class*="tablet stackable"].table tr > td {
    background: none;
    border: none !important;
    padding: 0.25em 0.75em;
    box-shadow: none !important;
  }
  .ui[class*="tablet stackable"].table th:first-child,
  .ui[class*="tablet stackable"].table td:first-child {
    font-weight: bold;
    padding-top: 1em;
  }
  .ui[class*="tablet stackable"].table th:last-child,
  .ui[class*="tablet stackable"].table td:last-child {
    box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset !important;
    padding-bottom: 1em;
  }
  
/* Clear BG Colors */
  .ui[class*="tablet stackable"].table tr > td.warning,
  .ui[class*="tablet stackable"].table tr > td.error,
  .ui[class*="tablet stackable"].table tr > td.active,
  .ui[class*="tablet stackable"].table tr > td.positive,
  .ui[class*="tablet stackable"].table tr > td.negative {
    background-color: transparent !important;
  }
  
/* Definition Table */
  .ui.definition[class*="tablet stackable"].table thead th:first-child {
    box-shadow: none !important;
  }
  .ui.definition[class*="tablet stackable"].table tr td:first-child {
    padding-bottom: 1em;
  }
  .ui.definition[class*="tablet stackable"].table tr td:nth-child(n+2) {
    padding-top: 1em;
  }
}

/*--------------
     Aligned
---------------*/

.ui.table[class*="left aligned"],
.ui.table [class*="left aligned"] {
  text-align: left;
}
.ui.table[class*="center aligned"],
.ui.table [class*="center aligned"] {
  text-align: center;
}
.ui.table[class*="right aligned"],
.ui.table [class*="right aligned"] {
  text-align: right;
}

/*--------------
    Collapsing
---------------*/

.ui.table th.collapsing,
.ui.table td.collapsing {
  width: 1px;
  white-space: nowrap;
}

/*--------------
     Attached
---------------*/


/* All */
.ui.attached.table {
  width: -webkit-calc(100% +  2px );
  width: calc(100% +  2px );
  margin: 0em -1px;
  border-radius: 0px;
  box-shadow: none;
}

/* Top */
.ui[class*="top attached"].table {
  margin-top: 1em 0em;
  border-radius: 0.25rem 0.25rem 0em 0em;
}
.ui.table[class*="top attached"]:first-child {
  margin-top: 0em;
}

/* Bottom */
.ui.table[class*="bottom attached"] {
  margin-top: 0em;
  margin-bottom: 1em 0em;
  border-radius: 0em 0em 0.25rem 0.25rem;
}
.ui.table[class*="bottom attached"]:last-child {
  margin-bottom: 0em;
}

/*--------------
     Striped
---------------*/


/* Table Striping */
.ui.striped.table > tr:nth-child(2n),
.ui.striped.table tbody tr:nth-child(2n) {
  background-color: rgba(0, 0, 50, 0.03);
}

/* Stripes */
.ui.inverted.striped.table > tr:nth-child(2n),
.ui.inverted.striped.table tbody tr:nth-child(2n) {
  background-color: rgba(255, 255, 255, 0.06);
}

/*-------------------
       Colors
--------------------*/

.ui.black.table {
  border-top: 0.2em solid #1b1c1d;
}
.ui.blue.table {
  border-top: 0.2em solid #3b83c0;
}
.ui.green.table {
  border-top: 0.2em solid #5bbd72;
}
.ui.orange.table {
  border-top: 0.2em solid #e07b53;
}
.ui.pink.table {
  border-top: 0.2em solid #d9499a;
}
.ui.purple.table {
  border-top: 0.2em solid #564f8a;
}
.ui.red.table {
  border-top: 0.2em solid #d95c5c;
}
.ui.teal.table {
  border-top: 0.2em solid #00b5ad;
}
.ui.yellow.table {
  border-top: 0.2em solid #f2c61f;
}

/*-------------------
   Inverted Colors
--------------------*/

.ui.inverted.table,
.ui.inverted.black.table {
  background-color: #1b1c1d !important;
  color: #ffffff !important;
}
.ui.inverted.blue.table {
  background-color: #3b83c0 !important;
  color: #ffffff !important;
}
.ui.inverted.green.table {
  background-color: #5bbd72 !important;
  color: #ffffff !important;
}
.ui.inverted.orange.table {
  background-color: #e07b53 !important;
  color: #ffffff !important;
}
.ui.inverted.pink.table {
  background-color: #d9499a !important;
  color: #ffffff !important;
}
.ui.inverted.purple.table {
  background-color: #564f8a !important;
  color: #ffffff !important;
}
.ui.inverted.red.table {
  background-color: #d95c5c !important;
  color: #ffffff !important;
}
.ui.inverted.teal.table {
  background-color: #00b5ad !important;
  color: #ffffff !important;
}
.ui.inverted.yellow.table {
  background-color: #f2c61f !important;
  color: #ffffff !important;
}

/*--------------
  Column Count
---------------*/


/* Grid Based */
.ui.one.column.table td {
  width: 100%;
}
.ui.two.column.table td {
  width: 50%;
}
.ui.three.column.table td {
  width: 33.33333333%;
}
.ui.four.column.table td {
  width: 25%;
}
.ui.five.column.table td {
  width: 20%;
}
.ui.six.column.table td {
  width: 16.66666667%;
}
.ui.seven.column.table td {
  width: 14.28571429%;
}
.ui.eight.column.table td {
  width: 12.5%;
}
.ui.nine.column.table td {
  width: 11.11111111%;
}
.ui.ten.column.table td {
  width: 10%;
}
.ui.eleven.column.table td {
  width: 9.09090909%;
}
.ui.twelve.column.table td {
  width: 8.33333333%;
}
.ui.thirteen.column.table td {
  width: 7.69230769%;
}
.ui.fourteen.column.table td {
  width: 7.14285714%;
}
.ui.fifteen.column.table td {
  width: 6.66666667%;
}
.ui.sixteen.column.table td {
  width: 6.25%;
}

/* Column Width */
.ui.table th.one.wide,
.ui.table td.one.wide {
  width: 6.25%;
}
.ui.table th.two.wide,
.ui.table td.two.wide {
  width: 12.5%;
}
.ui.table th.three.wide,
.ui.table td.three.wide {
  width: 18.75%;
}
.ui.table th.four.wide,
.ui.table td.four.wide {
  width: 25%;
}
.ui.table th.five.wide,
.ui.table td.five.wide {
  width: 31.25%;
}
.ui.table th.six.wide,
.ui.table td.six.wide {
  width: 37.5%;
}
.ui.table th.seven.wide,
.ui.table td.seven.wide {
  width: 43.75%;
}
.ui.table th.eight.wide,
.ui.table td.eight.wide {
  width: 50%;
}
.ui.table th.nine.wide,
.ui.table td.nine.wide {
  width: 56.25%;
}
.ui.table th.ten.wide,
.ui.table td.ten.wide {
  width: 62.5%;
}
.ui.table th.eleven.wide,
.ui.table td.eleven.wide {
  width: 68.75%;
}
.ui.table th.twelve.wide,
.ui.table td.twelve.wide {
  width: 75%;
}
.ui.table th.thirteen.wide,
.ui.table td.thirteen.wide {
  width: 81.25%;
}
.ui.table th.fourteen.wide,
.ui.table td.fourteen.wide {
  width: 87.5%;
}
.ui.table th.fifteen.wide,
.ui.table td.fifteen.wide {
  width: 93.75%;
}
.ui.table th.sixteen.wide,
.ui.table td.sixteen.wide {
  width: 100%;
}

/*--------------
    Sortable
---------------*/

.ui.sortable.table thead th {
  cursor: pointer;
  white-space: nowrap;
  border-left: 1px solid #d0d0d0;
  color: rgba(0, 0, 0, 0.8);
}
.ui.sortable.table thead th:first-child {
  border-left: none;
}
.ui.sortable.table thead th.sorted,
.ui.sortable.table thead th.sorted:hover {
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}
.ui.sortable.table thead th:after {
  display: inline-block;
  content: '';
  width: 1em;
  height: 1em;
  opacity: 0.8;
  margin: 0em 0em 0em 0.5em;
  font-family: 'Icons';
  font-style: normal;
  font-weight: normal;
  text-decoration: inherit;
}
.ui.sortable.table thead th.ascending:after {
  content: '\f0d7';
}
.ui.sortable.table thead th.descending:after {
  content: '\f0d8';
}

/* Hover */
.ui.sortable.table th.disabled:hover {
  cursor: auto;
  color: rgba(40, 40, 40, 0.3);
}
.ui.sortable.table thead th:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.8);
}

/* Sorted */
.ui.sortable.table thead th.sorted {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.8);
}

/* Sorted Hover */
.ui.sortable.table thead th.sorted:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.8);
}

/* Inverted */
.ui.inverted.sortable.table thead th.sorted {
  background: rgba(255, 255, 255, 0.07) -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  background: rgba(255, 255, 255, 0.07) linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  color: #ffffff;
}
.ui.inverted.sortable.table thead th:hover {
  background: rgba(255, 255, 255, 0.05) -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  background: rgba(255, 255, 255, 0.05) linear-gradient(transparent, rgba(0, 0, 0, 0.05));
  color: #ffffff;
}
.ui.inverted.sortable.table thead th {
  border-left-color: transparent;
  border-right-color: transparent;
}

/*--------------
    Inverted
---------------*/


/* Text Color */
.ui.inverted.table {
  background: #333333;
  color: #ffffff;
  border: none;
}
.ui.inverted.table th {
  background-color: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.2) !important;
  color: rgba(255, 255, 255, 0.9);
}
.ui.inverted.table tr td {
  border-color: rgba(0, 0, 0, 0.2) !important;
}
.ui.inverted.table tr.disabled td,
.ui.inverted.table tr td.disabled,
.ui.inverted.table tr.disabled:hover td,
.ui.inverted.table tr:hover td.disabled {
  pointer-events: none;
  color: rgba(225, 225, 225, 0.3);
}

/* Definition */
.ui.inverted.definition.table tfoot:not(.full-width) th:first-child,
.ui.inverted.definition.table thead:not(.full-width) th:first-child {
  background: #ffffff;
}
.ui.inverted.definition.table tr td:first-child {
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
}

/*--------------
   Collapsing
---------------*/

.ui.collapsing.table {
  width: auto;
}

/*--------------
      Basic
---------------*/

.ui.basic.table {
  background: transparent;
  border: 1px solid #d0d0d0;
  box-shadow: none;
}
.ui.basic.table thead,
.ui.basic.table tfoot {
  box-shadow: none;
}
.ui.basic.table th {
  background: transparent;
  border-left: none;
}
.ui.basic.table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.ui.basic.table td {
  background: transparent;
}
.ui.basic.striped.table tbody tr:nth-child(2n) {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Very Basic */
.ui[class*="very basic"].table {
  border: none;
}
.ui[class*="very basic"].table:not(.sortable):not(.striped) th,
.ui[class*="very basic"].table:not(.sortable):not(.striped) td {
  padding: 0.7em 0.8em;
}
.ui[class*="very basic"].table:not(.sortable):not(.striped) th:first-child,
.ui[class*="very basic"].table:not(.sortable):not(.striped) td:first-child {
  padding-left: 0em;
}
.ui[class*="very basic"].table:not(.sortable):not(.striped) th:last-child,
.ui[class*="very basic"].table:not(.sortable):not(.striped) td:last-child {
  padding-right: 0em;
}
.ui[class*="very basic"].table:not(.sortable):not(.striped) thead tr:first-child th {
  padding-top: 0em;
}

/*--------------
     Celled
---------------*/

.ui.celled.table tr th,
.ui.celled.table tr td {
  border-left: 1px solid #d4d4d5;
}
.ui.celled.table tr th:first-child,
.ui.celled.table tr td:first-child {
  border-left: none;
}

/*--------------
     Padded
---------------*/

.ui.padded.table th {
  padding-left: 1em;
  padding-right: 1em;
}
.ui.padded.table th,
.ui.padded.table td {
  padding: 1em 1em;
}

/* Very */
.ui[class*="very padded"].table th {
  padding-left: 1.5em;
  padding-right: 1.5em;
}
.ui[class*="very padded"].table td {
  padding: 1.5em 1.5em;
}

/*--------------
     Compact
---------------*/

.ui.compact.table th {
  padding-left: 0.7em;
  padding-right: 0.7em;
}
.ui.compact.table td {
  padding: 0.5em 0.7em;
}

/* Very */
.ui[class*="very compact"].table th {
  padding-left: 0.6em;
  padding-right: 0.6em;
}
.ui[class*="very compact"].table td {
  padding: 0.4em 0.6em;
}

/*--------------
      Sizes
---------------*/


/* Small */
.ui.small.table {
  font-size: 0.9em;
}

/* Standard */
.ui.table {
  font-size: 1em;
}

/* Large */
.ui.large.table {
  font-size: 1.1em;
}


/*******************************
         Theme Overrides
*******************************/



/*******************************
         Site Overrides
*******************************/