Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions source/css/_common/scaffolding/tables.styl
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
table {
.table-container {
margin: 20px 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
}

table {
width: $table-width;
border-collapse: collapse;
border-spacing: 0;
border: 1px solid $table-border-color;
font-size: $table-font-size;
word-break: break-all;
}

table>tbody>tr {
Expand All @@ -21,8 +24,8 @@ caption, th, td {
}

th, td {
border: 1px solid $table-border-color;
border-bottom: 3px solid $table-cell-border-bottom-color;
border-right: 1px solid $table-cell-border-right-color;
}

th {
Expand Down
5 changes: 5 additions & 0 deletions source/js/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ NexT.utils = NexT.$u = {

$(document).ready(function() {

function wrapTable() {
$('table').wrap('<div class="table-container"></div>');
}

/**
* Init Sidebar & TOC inner dimensions on all pages and for all schemes.
* Need for Sidebar/TOC inner scrolling if content taller then viewport.
Expand Down Expand Up @@ -327,4 +331,5 @@ $(document).ready(function() {
updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding());
}
initSidebarDimension();
wrapTable();
});