atst/styles/elements/_tables.scss
graham-dds 8eda056327 Revamp the app members table
- remove some of the custom styles in the page-specific style sheet.
Instead, try to rely on default USWDS styles as much as possible.
- tweak a few values in the tables stylesheet
- move some markup around in the members template
2019-10-08 13:15:28 -04:00

156 lines
2.3 KiB
SCSS

/*
* Tables
* @see https://designsystem.digital.gov/components/tables/
* @source https://github.com/uswds/uswds/blob/develop/src/stylesheets/elements/_table.scss
*/
table.atat-table {
@include panel-margin;
min-width: 100%;
@include ie-only {
border-collapse: separate;
}
th,
td {
&.table-cell {
&--align-right {
text-align: right;
}
&--align-center {
text-align: center;
}
&--shrink {
width: 1%;
}
&--expand {
width: 100%;
}
&--hide-small {
display: none;
@include media($medium-screen) {
display: table-cell;
}
}
}
}
thead {
tr th {
.sorting-direction {
position: inherit;
margin-right: -16px;
width: 16px;
.icon {
height: 14px;
width: 16px;
margin: 0;
}
}
}
}
tbody {
tr {
th,
td {
@include block-list-item;
display: table-cell;
white-space: nowrap;
border-bottom-style: solid;
border-top: none;
&:last-child {
border-bottom-style: dashed;
}
}
&:last-child {
td,
th {
border-bottom-style: solid;
}
}
}
}
thead {
tr {
th,
td {
@include block-list-header;
display: table-cell;
white-space: nowrap;
color: black;
}
}
}
@at-root .panel #{&} {
&:last-child {
margin-bottom: 0;
}
}
}
.responsive-table-wrapper {
overflow-x: auto;
@include panel-margin;
&__header {
@include panel-base;
@include panel-theme-default;
border-top: none;
border-bottom: 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
padding: $gap * 2;
&__title {
@include h4;
font-size: $lead-font-size;
justify-content: space-between;
flex: 2;
}
}
table {
margin-bottom: 0;
}
@at-root .panel #{&} {
&:last-child {
margin-bottom: 0;
}
}
}
.fixed-table-wrapper {
width: 100%;
table {
max-width: 100%;
table-layout: fixed;
th,
td {
white-space: normal;
}
}
}