Skip to content

Fix docs sidebar clipping on wide screens#468

Merged
chaokunyang merged 1 commit into
mainfrom
fix_website
Jun 14, 2026
Merged

Fix docs sidebar clipping on wide screens#468
chaokunyang merged 1 commit into
mainfrom
fix_website

Conversation

@chaokunyang

Copy link
Copy Markdown
Contributor

No description provided.

@chaokunyang chaokunyang merged commit f856d9c into main Jun 14, 2026
4 checks passed
@chaokunyang chaokunyang deleted the fix_website branch June 14, 2026 05:29
Comment thread src/css/custom.css
/*
* The menu is aligned with the centered navbar on wide screens. Keep the
* Docusaurus sidebar at least that wide, otherwise its overflow clipping
* hides the menu and the sidebar looks empty.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@chaokunyang the sidebar is rendered double it's width size on the screen by it should
Image

chaokunyang pushed a commit that referenced this pull request Jun 14, 2026
## 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-width`
became `300px + 320px = 620px` — about double the intended 300px.

## How

- Revert `--doc-sidebar-width` to the panel width (300px).
- Use the normal `--fory-doc-sidebar-inset` for the menu's left padding
instead of the large navbar offset.
- Remove the now-unused `--fory-doc-sidebar-offset` variable.

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.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants