mirror of
https://github.com/nasa/openmct.git
synced 2025-01-02 11:26:42 +00:00
Change table row layout to use flex
Fixes #2132 - flex styles applied; - CSS reorganized for better DRY; - Set height on <tr> so that <td>'s won't collapse when all cells of a row have empty values. This can occur when columns are hidden in a Telemetry Table.
This commit is contained in:
parent
a1d206bfc3
commit
2da2395473
@ -35,28 +35,30 @@ mct-table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mct-table {
|
.mct-table {
|
||||||
|
tr {
|
||||||
|
display: flex; // flex-flow defaults to row nowrap (which is what we want) so no need to define
|
||||||
|
height: 18px; // Needed when a row has empty values in its cells
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
td, th {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
display: block;
|
display: block;
|
||||||
tr {
|
|
||||||
display: block;
|
|
||||||
white-space: nowrap;
|
|
||||||
th {
|
|
||||||
display: inline-block;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody {
|
tbody {
|
||||||
tr {
|
tr {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
white-space: nowrap;
|
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user