Skip to content

Commit d77d3df

Browse files
authored
overlap-fix (#738)
Overlap fix ## Summary by Sourcery Rework the TOC panel to be fixed on the right with set width/height and scrolling, and disable it on smaller screens to prevent overlap Enhancements: - Reposition the table of contents as a fixed sidebar with controlled dimensions and overflow - Hide the table of contents on viewports narrower than 1024px to avoid content overlap
1 parent d2034b1 commit d77d3df

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/app/global.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,23 @@ th {
390390

391391
#nd-toc {
392392
background-color: var(--sidebar-background);
393+
position: fixed !important;
394+
right: 0 !important;
395+
top: 4rem !important;
396+
height: calc(100vh - 4rem) !important;
397+
z-index: 50 !important;
398+
overflow-y: auto !important;
399+
width: auto !important;
400+
min-width: 250px !important;
401+
max-width: 300px !important;
402+
padding-top: 2rem !important;
403+
}
404+
405+
/* Hide TOC on smaller screens to prevent overlap */
406+
@media (max-width: 1024px) {
407+
#nd-toc {
408+
display: none !important;
409+
}
393410
}
394411

395412
#nd-toc > div {

0 commit comments

Comments
 (0)