Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/components/docPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ export function DocPage({
max-width: none;
box-sizing: border-box;
}
/* At toc breakpoint (1490px), constrain content to leave room for TOC */
@media (min-width: 1490px) {
#doc-content {
/* Calculate max width: viewport - sidebar - TOC - gaps - padding */
/* Leave room for: sidebar (300px) + TOC (250px) + gaps (48px) + padding (96px) */
max-width: calc(100vw - 300px - 250px - 48px - 96px);
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Undefined CSS variable breaks sidebar positioning

The CSS at the 2057px breakpoint references var(--sidebar-width) which is never defined in the stylesheet, causing the left sidebar positioning calculation to fail. This would result in the sidebar not being positioned correctly at large viewports.

Fix in Cursor Fix in Web

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect padding value in width calculation

The media query calculation assumes 96px of horizontal padding, but the #doc-content element only has 48px from the px-6 Tailwind class (24px per side). This mismatch will cause the content to be constrained narrower than intended, reducing available space within the 1490px-2056px viewport range.

Fix in Cursor Fix in Web

@media (min-width: 2057px) {
:root {
--doc-content-w: 1100px;
Expand Down
Loading