KNACSS/sass/components/_tables.scss
2017-10-13 10:59:40 +02:00

52 lines
915 B
SCSS

/* ----------------------------- */
/* ==Tables */
/* ----------------------------- */
table,
.table {
width: 100%;
max-width: 100%;
table-layout: fixed;
border-collapse: collapse;
vertical-align: top;
margin-bottom: $medium-value;
}
.table {
display: table;
border: 1px solid $table-border;
background: $table-background;
&--zebra {
& tbody tr:nth-child(odd) {
background: $gray-200;
}
}
& caption {
caption-side: bottom;
padding: $small-value;
color: $table-caption-color;
font-style: italic;
text-align: right;
}
& td,
& th {
padding: 0.3rem 0.6rem;
min-width: $medium-value;
vertical-align: top;
border: 1px $table-border dotted;
text-align: left;
cursor: default;
}
& thead {
color: $table-head-color;
background: $table-head-background;
}
}
.table--auto {
table-layout: auto;
}