Banish the Black Box: Fixing Mobile Menu Glitches in Shopify's Dawn Theme

Hey there, fellow store owners! It's your Shopify migration expert here, diving into another common head-scratcher from the community forums. We all know how absolutely critical a flawless mobile experience is these days, right? Your customers are browsing on their phones, and any little glitch can send them packing. That's why I wanted to shine a light on a recent discussion that caught my eye – a classic case of the 'mystery black box' appearing on the mobile menu in the popular Dawn theme, alongside some vanishing social media icons.

AdamT06, a store owner using Dawn 11.0.0, brought this to the community, sharing screenshots of his mobile menu gone rogue. When opened, a peculiar black box would appear, obscuring parts of the menu. To add insult to injury, his social media icons at the bottom of the mobile menu were turning white, practically disappearing against a light background. Sound familiar? Let's dig into what the community uncovered and how you can tackle these visual snags.

The Annoying "Black Box" Mobile Menu on Dawn

Adam's initial post perfectly illustrated the problem. Imagine your sleek mobile menu, designed to guide customers, suddenly marred by an unexpected black rectangle. Not exactly the polished look we're aiming for, is it? Here's a peek at what he was seeing:

Shopify Dawn mobile menu with black box glitch

This visual bug, often caused by conflicting CSS styles or an incomplete stylesheet, can be super frustrating. It essentially creates an unwanted overlay when the menu drawer opens. Plus, the close 'X' icon for the menu itself was also affected, sometimes blending into the background.

Community-Tested Fix: Clearing the Way for a Clean Menu

Luckily, the Shopify community is full of helpful folks! Moeed jumped in with a direct, custom CSS solution that worked like a charm for Adam. This fix targets the specific elements causing the black overlay and ensures the close icon is visible.

How to Implement the Fix:

  1. First things first, always back up your theme before making any code changes. You can do this by going to "Online Store" > "Themes" > "Actions" > "Duplicate". Seriously, don't skip this step!
  2. From your Shopify admin, navigate to "Online Store" > "Themes".
  3. Find your active Dawn theme (or the theme you're working on), click "Actions", then select "Edit Code".
  4. In the file editor, locate the theme.liquid file under the "Layout" directory.
  5. Scroll all the way to the bottom of the theme.liquid file. You're looking for the closing tag.
  6. Just above the tag, paste the following CSS code:
    
    
  7. Click "Save".

This little snippet of CSS does two key things: it targets the pseudo-element responsible for the overlay when the menu opens (.menu-drawer-container.menu-opening:before) and effectively removes its background and height, making it transparent. It also ensures your menu's close icon (svg.icon.icon-close) has a black stroke, so it's always visible.

Adam confirmed this worked perfectly for the black box issue! Here's what the fixed menu should look like:

Fixed Shopify Dawn mobile menu without black box

What About Those Pesky White Social Media Icons?

Once the black box was banished, Adam had another excellent follow-up question: what about the social media icons at the bottom of the mobile menu? They were still appearing white, making them practically invisible against his light-colored menu background. Here’s an image showing what he meant:

Shopify Dawn mobile menu with white social media icons

Unfortunately, the community thread didn't provide a direct, universal CSS solution for changing the social media icon colors in this specific context. This is a common challenge because social media icons can be rendered in various ways: sometimes they're SVGs that can be styled with CSS fill or stroke properties, other times they might be image files, or even font icons with their own color properties.

If you're facing this, my advice is to first check your Theme Customizer (Online Store > Themes > Customize). Many modern themes, including Dawn, offer options to control social media icon colors directly within the theme settings. Look under sections like 'Footer', 'Header', or 'Theme Settings' for color pickers related to icons. If that doesn't work, you'd need to use your browser's developer tools (right-click > 'Inspect') to identify the specific CSS class or ID of those social media icons within the mobile menu. Once you have that, you could add another CSS rule to your tag. This might seem minor, but an unclosed tag can cause all sorts of unexpected rendering issues or prevent your custom CSS from being applied at all!

This just goes to show how crucial proper syntax and placement are when you're dabbling in theme code. Always make sure your custom CSS is wrapped correctly within tags and placed in an appropriate location, like right before the tag in theme.liquid, which ensures it loads after the main theme styles, giving your overrides the necessary priority.

So there you have it – a clear path to getting rid of that pesky black box on your Dawn theme's mobile menu and ensuring your close icon is always visible. While the social media icon color might require a bit more investigative work on your end, the principles of using custom CSS and careful inspection remain the same. The beauty of the Shopify community is how we all learn from each other's challenges and share solutions. Keep those mobile experiences smooth, and your customers will thank you for it!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases