Docs: mobile layout fix (#2466)

* Remove console warning

* Fix table overflow issue on mobile
This commit is contained in:
Joe Rickerby
2025-06-11 08:57:43 +01:00
committed by GitHub
parent ff86a64577
commit a73177515a
2 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ h1, h2, h3, h4, h5, h6 {
left: -3.236em;
max-width: calc(100cqw);
width: fit-content;
min-width: calc(100% + 3.236em + 3.236em);
min-width: min(calc(100% + 3.236em + 3.236em), 100cqw);
}
.rst-content .section .wy-table-responsive .docutils {
padding-left: 3.236em;
+7 -5
View File
@@ -134,11 +134,13 @@ function ThemeNav () {
// .wy-table-responsive activates css rules that change the size of
// tables, making anchor points move around.
console.log('Document ready, checking for anchor in URL');
const anchorEl = document.querySelector(window.location.hash);
anchorEl.getBoundingClientRect(); // Force layout to ensure scrollIntoView works correctly
if (anchorEl) {
console.log('Anchor element:', anchorEl);
anchorEl.scrollIntoView({ behavior: 'instant', block: 'start' });
if (window.location.hash) {
const anchorEl = document.querySelector(window.location.hash);
anchorEl.getBoundingClientRect(); // Force layout to ensure scrollIntoView works correctly
if (anchorEl) {
console.log('Anchor element:', anchorEl);
anchorEl.scrollIntoView({ behavior: 'instant', block: 'start' });
}
}
// end edit by joerick
};