A client reached out with a simple complaint: hovering over the header menu made the menu items disappear. Not glitch, not flicker, just gone. Move the mouse away and they’d reappear. The My Account link had the same problem on a separate page.
This is one of the most common bugs I see in WordPress sites that were customized through the theme Customizer rather than a child theme, and it’s almost never where people look first. Here’s the general pattern, using that real case as the anchor, so you can find and fix it yourself the next time a menu, button, or link “disappears” for no obvious reason.
The symptom: something is there, but you can’t see it
Invisible-state bugs share a signature: the element exists, it’s clickable, it’s in the DOM, but its color makes it functionally invisible against its background in one specific state. Usually that state is :hover, :focus, or :active. Sometimes it’s a specific viewport width. The element didn’t break. It just became the same color as what’s behind it.
That’s exactly what was happening here: text was rendering white-on-white the moment the hover state activated. No console error, no layout shift, nothing a client can screenshot and point to except “the menu disappears.”
Why Customizer CSS causes this more than theme CSS
Most themes ship reasonable default states for links, buttons, and menu items. The bug almost never lives in the theme’s own stylesheet. It lives in the Additional CSS box in the Customizer, where a previous developer (or a plugin, or a page builder export) added rules to fix one specific visual complaint, without checking what else those rules touched.
A rule like:
.main-navigation a:hover {
color: #ffffff;
}
might have been added to fix a hover color on a dark-background menu. Perfectly reasonable, in isolation. But if the theme update changes the menu background to white, or if that selector is more specific than intended and also matches a white-background submenu or the My Account link, you get white text on a white background and nobody notices until a customer complains.
Customizer CSS is dangerous specifically because:
- It’s global and unscoped. It applies site-wide with no context about which page or section it was written for.
- It’s invisible in the page editor. Nobody reviewing a page in Elementor or Gutenberg sees the Customizer’s Additional CSS box. It’s out of sight, so it’s out of mind, until something like a theme update shifts the layout underneath it.
- It accumulates. Every “quick fix” gets added to the same box, by different people, over years. Nobody prunes it. Specificity conflicts pile up silently.
How to find it fast
You don’t need to read the whole stylesheet. Use the state that’s broken to narrow the search immediately.
Step 1: Reproduce the exact state in DevTools. Right-click the invisible element, Inspect, then in the Styles panel find the :hov toggle (Chrome) or the equivalent “Force state” option. Force :hover (or whichever state is broken) and leave it forced. Now the invisible text is inspectable without your mouse leaving the element.
Step 2: Read the computed color, not the source. Look at the Computed tab, filter for color. It’ll show you the final resolved value and, critically, which rule won. Click through to that rule’s source. If it points to style.css (the file WordPress creates for Customizer Additional CSS), you’ve found your suspect immediately.
Step 3: Check the background too. An invisible-text bug is really a contrast bug: text color equals (or nearly equals) background color. Confirm both values, not just the text color, since sometimes the real conflict is a background rule that changed independently.
Step 4: Search Additional CSS for the selector. Once you know which selector is winning, open Appearance → Customize → Additional CSS and search for it directly. You’re now editing a known, isolated rule instead of guessing.
The fix, and why “just delete it” is usually wrong
The instinct is to delete the offending rule. Sometimes that’s right. But that rule may have been added for a real reason, on a different page, background, or theme state that still exists elsewhere in the site. Deleting it blind can trade one invisible-element bug for another, somewhere you’re not currently looking.
The safer fix is to narrow the selector’s scope so it only applies where it was originally intended, rather than removing it:
/* Before: too broad, catches every menu link everywhere */
.main-navigation a:hover {
color: #ffffff;
}
/* After: scoped to the specific menu instance it was written for */
.main-navigation.dark-bg a:hover {
color: #ffffff;
}
Then verify every place that selector used to match still looks correct, and every place it now excludes is no longer broken. This is the same discipline as fixing a bug in application code: change the smallest thing that fixes the actual defect, then check the blast radius.
In the real case, the fix was a corrected, properly scoped hover rule for the header menu, plus a separate fix for the My Account link’s own visibility issue on its page. Both verified live, same day.
Prevention: a 10-minute audit worth doing before every launch
If you inherited a site with a Customizer Additional CSS box that nobody’s cleaned in years, don’t wait for a customer to report a vanishing menu. Run this check:
- Open DevTools, force
:hoverand:focusstates on every primary navigation item, button, and link in the header and footer. - Do the same on your account/login pages, since those templates are often styled differently and get audited less.
- Check at your smallest supported breakpoint. Invisible-state bugs love to hide behind a mobile menu that nobody tested at 375px.
- If you find a broken state, resist deleting the rule that caused it. Scope it down instead, and confirm nothing else depended on its old, broader reach.
The takeaway
“The menu disappears” is rarely a plugin conflict or a broken theme. It’s almost always a color collision hiding in unscoped Customizer CSS, activated by a state (:hover, :focus) that’s easy to miss in a normal walkthrough because your mouse isn’t sitting still on the element long enough to notice.
Force the state in DevTools, read the computed color, find the winning rule, and scope it down rather than deleting it. Five minutes of that beats an hour of guessing, and it stops the fix from creating the next invisible bug somewhere else on the site.