fix: docs sidebar rendering at double width on wide screens#469
Merged
Conversation
The previous sidebar fix widened the container by the navbar offset (`(100vw - 1280px)/2`), which on a 1920px screen made the sidebar ~620px instead of 300px. Revert the width to the panel width and use a normal menu inset so the sidebar stays a consistent 300px at every screen width without clipping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
@chaokunyang have a look |
Contributor
The navbar was capped and centered at 1280px, so on wide screens the brand floated in a centered band that no longer lined up with the left-edge docs sidebar. Run the navbar full width and align its left padding with the sidebar inset so the logo sits above the sidebar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
@chaokunyang fixed? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
The docs sidebar renders at roughly double its intended width on wide screens.
Why
The previous fix (#468) widened the sidebar container by the navbar offset (
(100vw - 1280px)/2) so the padded menu wouldn't clip. On a 1920px-wide screen that offset is ~320px, so--doc-sidebar-widthbecame300px + 320px = 620px— about double the intended 300px.How
--doc-sidebar-widthto the panel width (300px).--fory-doc-sidebar-insetfor the menu's left padding instead of the large navbar offset.--fory-doc-sidebar-offsetvariable.The sidebar now stays a consistent 300px at every screen width with no clipping. Trade-off: the menu text no longer aligns under the centered navbar logo.