Horizon Header CSS: Why Your Dawn Fix Stopped Working
Pasted a Horizon header CSS fix from a Dawn-era tutorial and nothing changed? We traced four dead ends to the one selector Horizon actually honors.

Open your Horizon-themed homepage in a private window. Scroll up to the top. If your hero image is dark and your top navigation text is still black on top of it, you have the specific horizon header css problem this post is about. You have probably already pasted a fix from a Dawn-era tutorial, maybe from two tutorials, and watched nothing move. That trail has a shape, and we have run it enough times in help1 sessions to describe it beat by beat.
Quick answer: Horizon routes header color through CSS custom properties on .header__row, not the class selectors Dawn exposed. Pasted Dawn CSS loads fine and is then ignored, even with !important.
The horizon header css problem looks like a specificity bug. It is not. It is a selector-vocabulary mismatch between two Shopify themes that share a name on the Themes page and almost nothing else under the hood. Here is how we walked a merchant through it last week, hypothesis by hypothesis.
What we checked first
The first assumption any of us would make is theme-customizer forgetfulness. Online Store > Customize > Theme settings > Colors on a Horizon store does expose primary and secondary brand values. Those feed the body text and button colors. They do not feed the top navigation link color in the transparent-header state. You can set the brand palette to pure white and the nav text will stay whatever the theme compiled it as.
So the customizer was not the problem. The merchant had already tried that. We moved to the Custom CSS panel in the Header section, which is where Dawn merchants are used to going.
Why the Dawn selectors do nothing
The Dawn CSS the merchant had pasted looked right. A tutorial from 2024 recommended:
.menu-list__dropdown { background: #1a1a1a !important; }
.menu-list__dropdown-link { color: #ffffff !important; }
The rules loaded. DevTools confirmed they were in the stylesheet. Nothing on the page matched them. The issue is that Horizon does not use those class names. The dropdown container is .menu-list__submenu on Horizon. The mega menu link text is .mega-menu__link-title. The Dawn names were renamed when Horizon was written, and the migration guide is silent about this, so if your reference material was written before the Horizon switch you will paste selectors that match zero elements.
A merchant on Shopify Community thread 558437 put it bluntly: with a few additions to Dawn's base.css the drop-down colors changed; on Horizon the same CSS does nothing. That is one sentence of lost debugging time stretched across weeks.
Why direct color overrides lost
At this point we tried the brute-force move. We pointed DevTools at the actual nav link element, read the real class name off the DOM, and wrote a direct rule:
.header__row a { color: white !important; }
It loaded. It was in computed styles. The nav text rendered black. This is where we usually lose an hour on a case like this if we are not paying attention. The rule is not being overridden by a later rule - !important already handled that. The override is happening one level up the DOM, through a CSS custom property.
The way Horizon composes header text color is by assigning a variable at .header__row, roughly --color-foreground-rgb: 0 0 0;, and then every child element reads that variable. Setting color: on the child cannot win a specificity fight against a parent whose variable is still 0 0 0, because the variable travels through currentColor and inherit paths that your rule does not touch.
This is the real mental model shift for horizon header css. Your rule has to meet the variable system, or the variable system wins quietly.
The data-sticky-state clue
Even when we got the variables set, one more Horizon mechanism was in play. The merchant's transparent header was turning white as soon as the cursor entered the nav area, flashing between transparent and opaque in a way that looked broken. We were about to blame a hover-background rule. Then we found a data-sticky-state attribute on the header element in the DOM, flipping between inactive and active based on scroll position.
That attribute is not in Horizon's public documentation. It does not appear in the customizer. The only way to learn about it is to inspect the DOM at the moment of a scroll, or to find Shopify Community thread 657391 where a merchant and a contributor worked out together that [data-sticky-state='inactive'] is the only reliable hook for "the header is at the top of the page, over the hero image, in its transparent state." We have seen similar undocumented state attributes on the Horizon theme bugs we flag in every audit, but this one was new to the trail.
Once we added that attribute to the selector, the right branch of the problem opened up. Our CSS applied only when the header was actually transparent, and the hover flash resolved separately with:
.header[transparent] .header__row {
background: transparent !important;
}
That rule is from thread 422228, confirmed working by the original poster who replied with a thank-you and nothing else. Which is the right kind of community confirmation.
It was CSS variables all along
With the state attribute found and the Dawn selectors discarded, the actual fix is almost anticlimactic. Inside the Header section's Custom CSS, tim_tairli (a frequent contributor on the Shopify Community) documented this block that we now use as a template:
.header__underlay { display: none; }
.header__row {
--color-foreground-rgb: 255 255 255;
--color-foreground: rgb(255,255,255);
--header-background: transparent;
}
Three things to notice. First, both --color-foreground-rgb (space-separated numbers) and --color-foreground (a full rgb() value) have to be set, because different Horizon components read different formats. Second, .header__underlay { display: none; } removes the white overlay Horizon shows on nav hover, which if you leave in place defeats half of what you are trying to do. Third, this rule is global: it applies on every page the header renders.
For a merchant who wants their nav white on the dark homepage hero only, the block above causes a problem on interior pages. That is the last branch of this trail.
Scoping to the homepage without wrecking interior pages
Global Custom CSS runs on every template. If an interior collection page has a white header background (which Horizon's default does), white nav text produces white on white and the menu disappears. We have had this get through staging and land live more than once because the merchant only tested the homepage. We now check for it specifically before closing a session.
The scoping fix is to move the CSS out of the global Custom CSS field and into a Custom Liquid section added only to the homepage template. In the theme customizer, switch to the Homepage template, click Add section, pick Custom Liquid, and paste a <style> block inside it:
<style>
[data-sticky-state='inactive'] a.Meteor-Navigation__Link__desktop {
color: white !important;
}
</style>
Because the section lives only on the homepage template, the CSS never reaches the collection, product, or policy pages. The [data-sticky-state='inactive'] attribute selector further narrows it to the actual transparent state. If the merchant scrolls down, data-sticky-state flips to active, the sticky header appears with its opaque background, and the CSS stops matching.
This is also the honest moment to admit a limitation. Shopify does not promise data-sticky-state as a stable API. It is runtime JavaScript, not a theme setting. In the eighteen months of threads we have read on this, no one has reported it breaking on a theme update, but Horizon 2.0.2 did rename neighboring selectors and 3.3.0 restructured .header__underlay. If you build on undocumented attributes, you are agreeing to re-test after Horizon updates. For a store with one hero on one template, that trade is usually fine.
Where this leaves the horizon header css problem
A few patterns are worth carrying forward from this trail into the next five Horizon stores we look at.
- Before writing any custom CSS, check whether the rule would win against a parent CSS variable. If the property in question is one Horizon stores in a
--color-*variable, overwrite the variable on.header__rowrather than overridingcolor:on the child. - Treat any CSS from a 2023 or 2024 tutorial as Dawn CSS until proven otherwise. The class-name split between Dawn and Horizon is total for the nav.
.menu-list__dropdownis Dawn..menu-list__submenuis Horizon. Pasting the wrong one costs a debugging session. - If the behavior you want is state-dependent (transparent at the top, opaque on scroll), grep the DOM for a
data-sticky-stateattribute and target the state you actually mean. A rule with no state in the selector will blanket both. - If the fix only matters on one template, put it in a Custom Liquid section on that template. Global Custom CSS runs everywhere and causes white-on-white on interior pages often enough that we check for this specifically at the end of a chat session.
- When you plan to layer a sticky announcement bar on top of a transparent header, test the combination on a real phone before publishing. The theme preview iframe does not reflect scroll-triggered state transitions correctly. We have seen clean-looking previews that behave very differently on an actual iPhone.
If you have pasted three horizon header css fixes this week and the menu text is still the wrong color, the odds are the rule is not being rejected by specificity. The rule is being read by a browser that is then following a variable one level up, or you are using a selector Horizon does not have. It is worth ten minutes in DevTools to find which of those applies before pasting a fourth rule. The first fifteen minutes with a help1 expert is free if you want a second pair of eyes on the DOM before you publish.
So here is the question to answer before you paste the next rule: on the element you are trying to style, is the color being set directly, or is it inheriting from a parent variable you have not touched? The answer decides whether !important helps you or quietly makes things worse.
Still stuck? Talk to an expert.
Our vetted Shopify experts can fix this issue for you in a live session. $39 per session. Your first 15 minutes are free.