Skip to content

Sidebar content is blank while using Large/ Very Large browser font size settings #8291

Closed
Stars1233/mkdocs-material
#64

Description

@YumiChen

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:

Changing 1220px to 76.25em seems solving the issue in local

Related links

Reproduction

The issue could be replicated on Material for MkDocs

Image

Steps to reproduce

  1. Change browser font size settings:
    Chrome, Edge: Large or Very Large
    Safari: minimum font-size as 24px
  2. Set browser window width to be within 1220px to 1524px( or 1220px to 1829px for Very Large and Safari)
  3. go to https://mrkeo.github.io/
  4. Click the hamburger bar icon to open the sidebar
  5. Verify the sidebar content

Browser

No response

Before submitting

Activity

  1. squidfunk commented on Jul 1, 2025

    @squidfunk
    Owner

    Thanks for reporting and for providing the fix. Fixed in 1f7a496.

  2. added
    bugIssue reports a bug
    resolvedIssue is resolved, yet unreleased if open
    on Jul 1, 2025
  3. squidfunk commented on Jul 1, 2025

    @squidfunk
    Owner

    Released as part of 9.6.15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions