KNACSS/sass/components/_tables.scss

52 lines
918 B
SCSS
Raw Normal View History

2014-05-04 15:48:00 +02:00
/* ----------------------------- */
2016-05-20 08:58:56 +02:00
/* ==Tables */
2014-05-04 15:48:00 +02:00
/* ----------------------------- */
table,
2017-07-31 11:45:22 +02:00
.table {
2015-07-01 13:47:48 +02:00
width: 100%;
2015-11-19 04:33:55 +01:00
max-width: 100%;
2015-07-01 13:47:48 +02:00
table-layout: fixed;
border-collapse: collapse;
vertical-align: top;
2016-09-21 13:02:45 +02:00
margin-bottom: $medium-value;
2014-05-04 15:48:00 +02:00
}
2014-05-07 11:12:14 +02:00
2017-07-31 11:45:22 +02:00
.table {
2015-07-01 13:47:48 +02:00
display: table;
2017-09-20 16:50:49 +02:00
border: 1px solid $border-table;
background: $background-table;
2014-05-07 11:12:14 +02:00
2017-09-20 16:50:49 +02:00
&--zebra {
& tbody tr:nth-child(odd) {
background: $color-gray5;
}
}
2017-07-31 11:41:30 +02:00
2017-09-20 16:50:49 +02:00
& caption {
caption-side: bottom;
padding: $small-value;
color: $color-table-caption;
font-style: italic;
text-align: right;
}
2017-07-31 11:41:30 +02:00
2017-09-20 16:50:49 +02:00
& td,
& th {
padding: 0.3rem 0.6rem;
min-width: $medium-value;
vertical-align: top;
border: 1px $border-table dotted;
text-align: left;
cursor: default;
}
& thead {
color: $color-table-head;
background: $background-table-head;
}
2017-07-31 11:41:30 +02:00
}
2017-09-20 16:50:49 +02:00
.table--auto {
table-layout: auto;
2017-07-31 11:41:30 +02:00
}