Skip to content

fix: explorer content leaking into viewport on mobile#2352

Open
prasanth-ntu wants to merge 1 commit intojackyzha0:v4from
prasanth-ntu:fix/explorer-mobile-visibility-leak
Open

fix: explorer content leaking into viewport on mobile#2352
prasanth-ntu wants to merge 1 commit intojackyzha0:v4from
prasanth-ntu:fix/explorer-mobile-visibility-leak

Conversation

@prasanth-ntu
Copy link
Copy Markdown

@prasanth-ntu prasanth-ntu commented Mar 27, 2026

Summary

On mobile, a few pixels of explorer navigation links bleed into the visible viewport when the explorer is collapsed, appearing as floating text on the left edge of the screen.

Root cause: The collapsed explorer uses visibility: hidden + transform: translateX(-100vw) to hide its content panel. However:

  1. .folder-outer.open inside it sets visibility: visible, which per CSS spec overrides the parent's visibility: hidden
  2. .explorer-content is absolutely positioned relative to .sidebar.left (which has padding from the viewport edge), so translateX(-100vw) doesn't fully move the content off-screen

This causes visible explorer links to leak through the ~16px gap.

Fix: Override .folder-outer.open visibility to hidden when the explorer is in its collapsed state on mobile.

Screenshots

Before (floating text circled on left edge):

quartz-explorer-mobile-visibility-leak-before

Test plan

  • Verify no floating text appears on the left edge of pages in mobile view
  • Verify the explorer hamburger menu still opens and shows navigation correctly
  • Verify folder expand/collapse animations still work within the open explorer

On mobile, the collapsed explorer uses `visibility: hidden` +
`transform: translateX(-100vw)` to hide its content panel. However,
`.folder-outer.open` inside it sets `visibility: visible`, which per
CSS spec overrides the parent's hidden visibility. Combined with the
explorer-content being positioned relative to `.sidebar.left` (which
has padding from the viewport edge), the translateX(-100vw) doesn't
fully move the content off-screen, causing a few pixels of explorer
links to bleed into the visible viewport.

Fix: override `.folder-outer.open` visibility to hidden when the
explorer is in its collapsed state on mobile.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
quartz ✅ Ready (View Log) Visit Preview 5f4ad5e

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.

1 participant