Skip to content

Commit f8b276e

Browse files
authored
fix(developer docs): Correcting width issues in developer docs for toc (#15559)
Fixing width issues by dynamically calculating width and allowing center content to reduce in size as needed to fit full width of TOC
1 parent 110c634 commit f8b276e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/docPage/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ export function DocPage({
134134
max-width: none;
135135
box-sizing: border-box;
136136
}
137+
/* At toc breakpoint (1490px), constrain content to leave room for TOC */
138+
@media (min-width: 1490px) {
139+
#doc-content {
140+
/* Calculate max width: viewport - sidebar - TOC - gaps - padding */
141+
/* Leave room for: sidebar (300px) + TOC (250px) + gaps (48px) + padding (96px) */
142+
max-width: calc(100vw - 300px - 250px - 48px - 96px);
143+
}
144+
}
137145
@media (min-width: 2057px) {
138146
:root {
139147
--doc-content-w: 1100px;

0 commit comments

Comments
 (0)