dash-website/src/scss/_tables.scss
2017-03-29 09:07:33 -06:00

58 lines
789 B
SCSS

table {
margin: 1em 0;
max-width: 100%;
}
th, td {
padding: 0.65em 0.5em;
font-size: 85%;
border-bottom: 1px solid #ccc;
}
th {
white-space: nowrap;
text-align: left;
font-weight: bold;
}
tbody > tr {
border-top: 1px solid rgba(black, 0.25);
&:hover {
background-color: rgba(black, 0.05);
}
}
@mixin table-compact-mixin {
display: block;
thead, tbody, tr, th, td:nth-child(n) {
display: block;
text-align: left;
}
thead > tr {
position: fixed;
right: 110vw;
}
tbody > tr {
border: none;
}
td + td {
border-top: 1px solid rgba(black, 0.25);
}
td:first-child {
margin: 20px 0 0;
}
td::before {
content: attr(data-header);
display: inline-block;
font-weight: bold;
width: 11em;
padding-right: 1em;
text-align: right;
}
}