mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
fuck around with responsive reflow table idea
This commit is contained in:
Vendored
+560
-531
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -542,3 +542,51 @@ Create responsive tables by wrapping any `.table` in `.table-responsive` to make
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
|
||||||
|
### Reflow
|
||||||
|
|
||||||
|
{% example html %}
|
||||||
|
<table class="table table-reflow">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Table heading</th>
|
||||||
|
<th>Table heading</th>
|
||||||
|
<th>Table heading</th>
|
||||||
|
<th>Table heading</th>
|
||||||
|
<th>Table heading</th>
|
||||||
|
<th>Table heading</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>1</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>3</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
<td>Table cell</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endexample %}
|
||||||
|
|||||||
Vendored
+560
-531
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+65
-13
@@ -43,25 +43,25 @@ th {
|
|||||||
border-bottom: 2px solid @table-border-color;
|
border-bottom: 2px solid @table-border-color;
|
||||||
}
|
}
|
||||||
// Remove top border from thead by default
|
// Remove top border from thead by default
|
||||||
> caption + thead,
|
// > caption + thead,
|
||||||
> colgroup + thead,
|
// > colgroup + thead,
|
||||||
> thead:first-child {
|
// > thead:first-child {
|
||||||
> tr:first-child {
|
// > tr:first-child {
|
||||||
> th,
|
// > th,
|
||||||
> td {
|
// > td {
|
||||||
border-top: 0;
|
// border-top: 0;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// Account for multiple tbody instances
|
// Account for multiple tbody instances
|
||||||
> tbody + tbody {
|
> tbody + tbody {
|
||||||
border-top: 2px solid @table-border-color;
|
border-top: 2px solid @table-border-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nesting
|
// Nesting
|
||||||
.table {
|
// .table {
|
||||||
background-color: @body-bg;
|
// background-color: @body-bg;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -264,3 +264,55 @@ table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.table-reflow {
|
||||||
|
|
||||||
|
thead {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody {
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
> thead,
|
||||||
|
> tbody,
|
||||||
|
> tfoot {
|
||||||
|
> tr {
|
||||||
|
> th,
|
||||||
|
> td {
|
||||||
|
border-top: 1px solid @table-border-color;
|
||||||
|
border-left: 1px solid @table-border-color;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-right: 1px solid @table-border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
> tr:last-child {
|
||||||
|
> th,
|
||||||
|
> td {
|
||||||
|
border-bottom: 1px solid @table-border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
border-right: ;
|
||||||
|
border-bottom: ;
|
||||||
|
|
||||||
|
|
||||||
|
tr {
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
display: block !important;
|
||||||
|
border: 1px solid @table-border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user