1
0
mirror of https://github.com/Chalarangelo/mini.css.git synced 2025-07-31 02:50:26 +02:00

Table mobile view

This commit is contained in:
Angelos Chalaris
2018-01-02 14:56:51 +02:00
parent 3a8fb37b20
commit a54a409c1d
4 changed files with 99 additions and 5 deletions

43
dist/mini-default.css vendored
View File

@@ -1775,3 +1775,46 @@ table td {
table tbody tr:first-child td {
border-top: 0;
}
@media screen and (max-width: 767px) {
table {
border-collapse: collapse;
border: 0;
width: 100%;
display: table;
}
table thead, table th {
border: 0;
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
}
table tbody {
display: table-row-group;
}
table tr {
display: block;
border: 0.0625rem solid var(--table-border-color);
border-radius: var(--universal-border-radius);
background: #fafafa;
padding: var(--universal-padding);
margin: var(--universal-margin);
margin-bottom: calc(2 * var(--universal-margin));
}
table td {
display: block;
border: 0;
text-align: right;
}
table td:before {
content: attr(data-label);
float: left;
font-weight: 600;
}
}

File diff suppressed because one or more lines are too long