Commit 8b24cedc authored by Nikolay Gromov's avatar Nikolay Gromov

Исправил Адаптивные таблицы со сменой строк на колонки

parent 08d73916
...@@ -3,21 +3,24 @@ ...@@ -3,21 +3,24 @@
.table-responsive-rotate { .table-responsive-rotate {
&--thead-fix { @media (max-width: (@screen-md - 1)) {
position: relative;
padding-left: 12rem;
.table-responsive-rotate__inner { &--thead-fix {
display: block; position: relative;
width: 100%; padding-left: 12rem;
overflow-x: auto;
} .table-responsive-rotate__inner {
display: block;
width: 100%;
overflow-x: auto;
}
thead { thead {
width: 12rem; width: 12rem;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
}
} }
} }
} }
...@@ -2,44 +2,56 @@ ...@@ -2,44 +2,56 @@
.table-responsive-rotate { .table-responsive-rotate {
display: block;
width: 100%; @media (max-width: (@screen-md - 1)) {
overflow-x: auto; display: block;
margin-top: (@line-height / 2);
margin-bottom: (@line-height / 2);
border: 1px solid @border-color;
table {
display: flex;
margin: 0;
border: 0 !important;
width: 100%; width: 100%;
} overflow-x: auto;
margin-top: (@line-height / 2);
margin-bottom: (@line-height / 2);
border: 1px solid @border-color;
table {
display: flex;
margin: 0;
border: 0 !important;
width: 100%;
}
tbody { tbody {
display: flex; display: flex;
} }
tr { tr {
display: block; display: block;
} }
th, th,
td { td {
display: block; display: block;
width: 100%; width: 100%;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
border-left: 0; border-left: 0;
border-right: 1px solid @border-color; border-right: 1px solid @border-color;
&:last-child { &:last-child {
border-bottom: 0; border-bottom: 0;
}
} }
}
caption { tfoot {
display: none; tr:last-child {
th,
td {
border-right: 0;
}
}
}
caption {
display: none;
}
} }
} }
...@@ -1163,7 +1163,7 @@ ...@@ -1163,7 +1163,7 @@
<p>Для просмотра адаптации таблицы сделайте вьюпорт узким.</p> <p>Для просмотра адаптации таблицы сделайте вьюпорт узким.</p>
<p class="alert alert--danger"><strong>ВНИМАНИЕ!</strong> Контент в ячейках таблицы жёстко фиксируется как однострочный (нет зависимости развёрнутых ячеек).</p> <p class="alert alert--danger"><strong>ВНИМАНИЕ!</strong> При перестройке контент в ячейках таблицы жёстко фиксируется как однострочный (нет зависимости развёрнутых ячеек).</p>
<p class="alert alert--danger"><strong>ВНИМАНИЕ!</strong> Ячейки не должны объединяться. <code>caption</code> скрывается.</p> <p class="alert alert--danger"><strong>ВНИМАНИЕ!</strong> Ячейки не должны объединяться. <code>caption</code> скрывается.</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment