Repository navigation
Sidebar content is blank while using Large/ Very Large browser font size settings #8291
Description
Context
No response
Bug description
When visiting the documentation site and increasing the browser’s font size to Large or Very Large, the sidebar transforms into a drawer at certain points. However, when the drawer is opened, its contents may appear empty.
Thoughts:
After looking into this, this seems to be because height: 0 style is added to .md-sidebar--primary .md-sidebar__scrollwrap. It seems to be added in mountSidebar
I think the cause may be because of mountSidebar being triggered unintentionally when tablet styles are applied:
| ? at(screen$, () => mountSidebar(el, { viewport$, header$, main$ })) |
There seems to be some discrepancies in Javascript and CSS deciding if tablet styles should be displayed, which caused this issue:
-
screen$is usingpxformatchMedia:
const screen$ = watchMedia("(min-width: 1220px)") -
in CSS
emis used to switch the desktop and tablet styles:
mkdocs-material/src/overrides/home.html
Line 55 in 2b0417f
@media screen and (min-width: 76.25em) {
Changing 1220px to 76.25em seems solving the issue in local
Related links
- Reporting a bug
- Consider switching media queries to px breakpoints #5530
- Not sure if this is related to Footer Overlaps Left Navigation between 60em and 76.25em if the nav is longer than the content #8237, which seems to also have mismatching breakpoints and styles
Reproduction
The issue could be replicated on Material for MkDocs
Steps to reproduce
- Change browser font size settings:
Chrome, Edge:LargeorVery Large
Safari: minimum font-size as24px - Set browser window width to be within
1220pxto1524px( or1220pxto1829pxforVery Largeand Safari) - go to https://mrkeo.github.io/
- Click the hamburger bar icon to open the sidebar
- Verify the sidebar content
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.

Activity
squidfunk commentedon Jul 1, 2025
Thanks for reporting and for providing the fix. Fixed in 1f7a496.
squidfunk commentedon Jul 1, 2025
Released as part of 9.6.15.