From f89f7c016ddccb303716220e0e40a04092b01a93 Mon Sep 17 00:00:00 2001 From: Hugh Ratsch Date: Sun, 2 Mar 2025 12:27:47 -0600 Subject: [PATCH] Apply aggressive TOC hiding rules to fix persistent right sidebar --- custom.css | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/custom.css b/custom.css index 8c6406f..50f3ab0 100644 --- a/custom.css +++ b/custom.css @@ -2,6 +2,9 @@ /* Show the left navigation sidebar but modify styling */ .sidebar { + display: block !important; + width: auto !important; + visibility: visible !important; background-color: rgba(245, 245, 247, 0.95) !important; border-right: 1px solid #e1e4e8 !important; } @@ -10,10 +13,32 @@ padding: 10px !important; } -/* Hide the floating right-side table of contents */ -.page-toc, +/* Hide the floating right-side table of contents - using more specific and aggressive rules */ +.nav-wide-wrapper, +div[class*="toc"], +.page-toc, .pagetoc, -.table-of-contents { +.table-of-contents, +aside.right-side, +aside.sidebar-right, +.floating-toc, +#toc-container { + display: none !important; + visibility: hidden !important; + width: 0 !important; + height: 0 !important; + position: absolute !important; + right: -9999px !important; + opacity: 0 !important; + pointer-events: none !important; +} + +/* Override any inline styles that might be applied to the TOC */ +[id*="toc"], +[class*="toc"], +[class*="content"] [class*="toc"], +[id*="sidebar-toc"], +[class*="sidebar-toc"] { display: none !important; visibility: hidden !important; } @@ -26,6 +51,17 @@ padding: 0 30px !important; } +/* Ensure the main content fills the space */ +main, +.content, +.page, +article, +.page-content { + max-width: 100% !important; + margin-right: 0 !important; + padding-right: 0 !important; +} + /* Improve chapter navigation */ .chapter { line-height: 1.3 !important;