1
0
mirror of https://github.com/minio/docs.git synced 2025-07-28 19:42:10 +03:00

Add responsive wrappers for tables (#533)

* Add responsive wrappers for tables

* Add missing styles
This commit is contained in:
Rushan
2022-08-23 23:49:05 +04:00
committed by GitHub
parent 01a5552631
commit 1bb0e097b7
4 changed files with 46 additions and 1 deletions

View File

@ -334,4 +334,20 @@ window.addEventListener("DOMContentLoaded", (event) => {
} }
} }
})(); })();
// --------------------------------------------------
// Responsive tables
// --------------------------------------------------
(function () {
const tableEls = document.querySelectorAll("table");
if(tableEls.length > 0) {
tableEls.forEach((item) => {
var tableWrapper = document.createElement("div");
tableWrapper.classList.add("table-responsive");
item.insertAdjacentElement("beforebegin", tableWrapper);
tableWrapper.appendChild(item);
});
}
})();
}); });

View File

@ -29,6 +29,10 @@ div.admonition {
code { code {
color: currentColor; color: currentColor;
&.xref {
border: 0;
}
} }
.highlight { .highlight {

View File

@ -143,7 +143,7 @@
} }
@include breakpoint-max(breakpoints(lg)) { @include breakpoint-max(breakpoints(lg)) {
top: 10rem top: 7.2rem
} }
&:not(.active) { &:not(.active) {

View File

@ -208,6 +208,31 @@ table.docutils {
} }
.table-responsive {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin: 1rem 0 2rem;
border-left: 1px solid var(--table-border-color);
border-right: 1px solid var(--table-border-color);
table {
margin: 0;
tr {
td, th {
&:first-child {
border-left-color: transparent;
}
&:last-child {
border-right-color: transparent;
}
}
}
}
}
// ---------------------- // ----------------------
// Form // Form
// ---------------------- // ----------------------