webseite/assets/scss/parts/_table.scss

102 lines
1.5 KiB
SCSS
Raw Normal View History

2019-02-12 17:45:44 +01:00
/* Table */
table {
margin: 0 0 _size(element-margin) 0;
width: 100%;
2019-05-05 16:46:24 +02:00
word-wrap:break-word;
table-layout: fixed;
2019-02-12 17:45:44 +01:00
tbody {
tr {
border: solid 1px _palette(border);
border-left: 0;
border-right: 0;
&:nth-child(2n + 1) {
background-color: _palette(border-bg);
}
}
}
td {
padding: 0.75em 0.75em;
}
th {
color: _palette(fg-bold);
font-size: 0.9em;
font-weight: _font(weight-bold);
padding: 0 0.75em 0.75em 0.75em;
text-align: left;
}
thead {
border-bottom: solid 1px _palette(border);
}
tfoot {
border-top: solid 1px _palette(border);
}
&.alt {
border-collapse: separate;
tbody {
tr {
td {
border: solid 1px _palette(border);
border-left-width: 0;
border-top-width: 0;
&:first-child {
border-left-width: 1px;
}
}
&:first-child {
td {
border-top-width: 1px;
}
}
}
}
thead {
border-bottom: 0;
}
tfoot {
border-top: 0;
}
}
2019-05-05 16:46:24 +02:00
ul {
margin: 0 0 0 0;
}
@include breakpoint(mobileonly) {
td {
width:100%;
display: block;
margin:10px 0px;
text-align: center;
}
}
2019-02-12 17:45:44 +01:00
}
2019-05-05 16:46:24 +02:00
.table-wrapper {
-webkit-overflow-scrolling: touch;
overflow-x: auto;
&.code {
border-radius: 5px;
font-style: italic;
table {
margin: 0 0 0 0;
tbody {
tr {
border: 0;
}
}
}
}
}