atst/styles/elements/_tables.scss
2018-08-03 09:09:07 -04:00

93 lines
1.4 KiB
SCSS

/*
* Tables
* @see https://designsystem.digital.gov/components/tables/
* @source https://github.com/uswds/uswds/blob/develop/src/stylesheets/elements/_table.scss
*/
table {
@include panel-margin;
min-width: 100%;
tbody {
tr {
th,
td {
@include block-list-item;
display: table-cell;
white-space: nowrap;
border-bottom-style: dashed;
border-top: none;
&:last-child {
border-bottom-style: dashed;
}
}
&:last-child {
td,
th {
border-bottom-style: solid;
}
}
.table-cell--align-right {
text-align: right;
}
.table-cell--shrink {
width: 1%;
}
.table-cell--expand {
width: 100%;
}
.table-cell--hide-small {
display: none;
@include media($medium-screen) {
display: table-cell;
}
}
}
}
thead {
tr {
th {
@include block-list-header;
display: table-cell;
}
}
}
@at-root .panel #{&} {
tr:last-child td {
border-bottom: 0;
}
&:last-child {
margin-bottom: 0;
}
}
}
.responsive-table-wrapper {
overflow-x: auto;
@include panel-margin;
table {
margin-bottom: 0;
}
@at-root .panel #{&} {
tr:last-child td {
border-bottom: 0;
}
&:last-child {
margin-bottom: 0;
}
}
}