Skip to content

fix docs sidebar width - #305

Merged
9names merged 2 commits into
probe-rs:masterfrom
datdenkikniet:fix-width
Oct 5, 2026
Merged

9names merged 2 commits into
probe-rs:masterfrom
datdenkikniet:fix-width

Conversation

@datdenkikniet

@datdenkikniet datdenkikniet commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

I tried to fix #303. This is an LLM-generated fix, but it looks sensible to me, and the explanation makes sense.

I am no CSS expert, so I do not know if this is the true fix: however, the look is definitely fixed and the visual diff is minimal. The added CSS class also seems to make sense.

Claude's description of the fix is as follows:

Fixed. The bug was in src/layouts/Doc.astro: the sidebar <nav> had md:min-w-3xs (a floor, no ceiling), so long sidebar entries like "Infineon Devices: Known Limitations" forced the sidebar to grow wider than the md:ml-74 margin reserved for it in the content area, causing an overlap.

I added md:max-w-3xs to cap the sidebar at the same 16rem width on desktop, so long titles wrap onto multiple lines instead of pushing the sidebar wider. Verified with headless-browser screenshots that:

  • previously-overlapping page (infineon-known-limitations) now renders cleanly with no overlap.
  • normal-length page (which-tool) still looks correct.
  • layout (off-canvas menu) is unaffected.

@datdenkikniet

Copy link
Copy Markdown
Contributor Author

No wait, this is broken: scrolling for the sidebar is now broken, so actually getting to the FAQ link is hard/impossible now... I will look a little more

With this change, the code blocks no longer appear on top of the
navigation bar when/if you're in the mobile view and open the navigation
menu.
@datdenkikniet

Copy link
Copy Markdown
Contributor Author

OK, mostly fixed now. I have am flying blind: I can only see that it works now, but have no clue whether this is the correct fix.

@9names 9names left a comment

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.

Well the current thing is broken, this at least looks correct for the sidebar.
The main pane is also not resizing correctly depending on the device width, but this is good start.
LGTM

@9names
9names merged commit 7dd9a83 into probe-rs:master Oct 5, 2026
1 check failed
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.

docs page: menu sidebar overlaps the content

2 participants