Improves TOC layouts for long content

Keeps heading permalink icons visible by allowing horizontal overflow.

Prevents long code blocks and tables from overlapping the page TOC by enabling horizontal scrolling where needed.
This commit is contained in:
rbalsleyMSFT
2026-02-05 12:59:27 -08:00
parent dc024c9d99
commit edc9901e7e
+10 -2
View File
@@ -132,8 +132,16 @@
margin-right: 0;
justify-self: stretch;
/* Safety net: if anything still overflows, don't let it render under the TOC */
overflow-x: hidden;
/* Keep heading permalink icons visible */
/* (Just-the-Docs positions .anchor-heading to the left at desktop widths) */
overflow-x: visible;
}
/* Safety net: prevent long code/tables from overlapping the TOC */
.main-content-wrap.has-page-toc .main-content pre,
.main-content-wrap.has-page-toc .main-content .highlighter-rouge,
.main-content-wrap.has-page-toc .main-content .table-wrapper {
overflow-x: auto;
}
/* TOC always stays in the right column */