-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update media queries to avoid horizontal scroll when side menu appears #17694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -164,6 +164,13 @@ export async function DocPage({ | |
| max-width: var(--doc-content-w); | ||
| box-sizing: border-box; | ||
| } | ||
| /* When the TOC is visible but the full layout doesn't fit yet, shrink content | ||
| to fill available space rather than overflowing. */ | ||
| @media (min-width: 1490px) and (max-width: 1649px) { | ||
| #doc-content { | ||
| max-width: calc(100vw - var(--sidebar-width, 300px) - var(--toc-w) - 2rem); | ||
| } | ||
| } | ||
|
Comment on lines
+169
to
+173
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The new media query for Suggested FixThe CSS rule that subtracts Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| /* Mobile responsive styles */ | ||
| @media (max-width: 768px) { | ||
| .main-content { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Media query shrinks content on pages without TOC
Medium Severity
The new media query unconditionally subtracts
--toc-w(250px) from#doc-contentmax-width, but the TOC sidebar is only rendered whenhasTocis true (line 63). On pages wherehasTocis false (e.g., pages withnotoc: truein frontmatter and no platform/guide), the content area is unnecessarily narrowed by 250px in the 1490–1649px viewport range, even though no TOC is taking up space.Reviewed by Cursor Bugbot for commit 54d938b. Configure here.