Skip to content

fix: prevent white overlay when mobile burger menu opens#15

Closed
vahldiek wants to merge 1 commit into
ReproDB:mainfrom
vahldiek:fix/mobile-burger-menu-white-overlay
Closed

fix: prevent white overlay when mobile burger menu opens#15
vahldiek wants to merge 1 commit into
ReproDB:mainfrom
vahldiek:fix/mobile-burger-menu-white-overlay

Conversation

@vahldiek

Copy link
Copy Markdown
Member

Problem

On mobile, tapping the burger menu icon causes a full-screen white overlay to appear, making the page appear blank. This occurs in both light and dark mode.

Root Cause

The Minimal Mistakes theme's greedy-nav jQuery plugin adds a .close class to .greedy-nav__toggle when clicked, which triggers a ::before pseudo-element styled as a full-screen white backdrop (opacity: 0.9, background-color: #fff, position: fixed, width/height: 100%).

Since we use Alpine.js for the hamburger menu instead of the theme's built-in .hidden-links mechanism, this overlay serves no purpose and simply blocks the entire page.

Fix

  1. Navicon visibility — prevents the .close class from making the hamburger icon invisible
  2. jQuery handler removal — unbinds the theme's jQuery click handler on window.load so it cannot toggle the .close class or interfere with Alpine's menu

Testing

  • Jekyll build passes
  • Mobile: burger menu opens and shows navigation links (light mode)
  • Mobile: burger menu opens and shows navigation links (dark mode)
  • Desktop: navigation still works normally

The Minimal Mistakes theme's greedy-nav JS adds a .close class to the
hamburger toggle button, which triggers a full-screen white ::before
overlay (opacity 0.9, background #fff). Since we use Alpine.js for the
hamburger menu instead of the theme's built-in mechanism, this overlay
blocks the entire page on mobile in both light and dark mode.

Fixes:
1. Add inline <style> in head/custom.html that sets display:none and
   content:none on .greedy-nav__toggle::before (guaranteed to load
   before the theme's CSS takes effect)
2. Prevent the .close class from hiding the navicon (hamburger icon)
3. Unbind jQuery's click handler on window load so the theme's JS
   cannot interfere with Alpine's menu toggling
@vahldiek vahldiek closed this Jun 16, 2026
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