diff --git a/docs/extra.css b/docs/extra.css index ecd99f66..770508a6 100644 --- a/docs/extra.css +++ b/docs/extra.css @@ -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; diff --git a/docs/theme_overrides/js/theme.js b/docs/theme_overrides/js/theme.js index f87c9f26..05689756 100644 --- a/docs/theme_overrides/js/theme.js +++ b/docs/theme_overrides/js/theme.js @@ -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 };