Dynamic Shopify Logos: Make Your Dawn Theme Header Pop on Scroll (and with Dropdowns!)
Hey fellow store owners! Ever noticed how some websites have headers that just flow? The logo subtly shifts color or style as you scroll down the page, or when you interact with a menu? It's a small detail, but it adds a touch of polish and professionalism that customers definitely pick up on. Recently, our community had a fantastic discussion on exactly this, with RebekkaBavnild asking a question many of you have probably thought about: "How do you change the wordmark / logo on scroll in the theme Dawn?"
Rebekka's specific challenge was wanting her white logo to appear only at the very top of her homepage, then switch to a burgundy/red version as soon as visitors scrolled down or navigated to any other page. A classic design dilemma, right? Let's dive into the solutions our experts cooked up.
Why Dynamic Logos Matter for Your Store
First off, why bother with this? It's all about user experience and branding consistency. Imagine a crisp, clean white logo against a hero image at the top of your homepage. Looks great! But then, as the user scrolls, that header might become transparent or sticky, revealing content that clashes with a white logo, making it hard to read. A dynamic logo ensures your brand is always visible and legible, no matter the background. It's about maintaining that professional edge and guiding your customer's eye.
The Elegant Solution: CSS Filters (Thanks, tim_tairli!)
One of the best insights from the thread came from tim_tairli, who championed a super clean approach using CSS filters. The genius here? You don't need two separate logo images floating around in your HTML. Instead, you upload your "darker" (in Rebekka's case, red) logo as your default, and then use CSS to magically "brighten" it to white when it's at the top of the page. This keeps your theme code cleaner and makes future updates less of a headache.
Here’s how you can implement this for your Dawn theme:
Step-by-Step: Implement a Dynamic Logo with CSS Filters
- Upload Your Default (Dark) Logo: Head into your Shopify Admin, navigate to Online Store > Themes > Customize. In the theme editor, go to the Header section and upload your darker version of the logo (e.g., Rebekka's burgundy/red logo) as your primary logo. This will be the default that shows up on most pages and when you scroll down.
- Access Your Theme Code: Back in your Shopify Admin, go to Online Store > Themes. Find your active Dawn theme (or a duplicate for testing, which is always recommended!) and click Actions > Edit code.
-
Locate
theme.liquid: In the file editor, find thetheme.liquidfile under the "Layout" directory. This file is your theme's main template and applies across your entire store. -
Add the CSS Code: Scroll down to the bottom of the
theme.liquidfile, just before the closingtag (or even better, link to an asset CSS file if you're comfortable with that, but for a quick fix,theme.liquidworks). Paste the following CSS code:Quick Explanation of the Code:
.section-header: This targets your main header element.:not(.scrolled-past-header, ...): This is the magic! It applies the styles only when the header does NOT have the.scrolled-past-headerclass (meaning you're at the top of the page).:has([open="true"], .menu-drawer-container[open]): This clever bit, added by tim_tairli after Rebekka's follow-up, ensures the logo also reverts to its default (dark) state if a dropdown menu or mobile drawer is open. This is crucial for legibility against potentially complex menu backgrounds..header__heading-logo: This targets your actual logo image within the header.filter: brightness(10);: This CSS property dramatically increases the brightness, effectively turning a dark logo white (or very close to it). You might need to adjust the number (e.g.,brightness(5)orbrightness(20)) depending on your original logo's color and desired white level.
-
Save and Test: Save your changes and visit your store. You should see your logo turn white at the very top of the homepage and revert to its dark color as you scroll down or open a menu. Crucially, because it's in
theme.liquid, it should work across your entire site where the header appears in this state.
The Alternative: Toggling Two Separate Logos
While the CSS filter method is often simpler, there's another approach mentioned by Moeed in the thread that involves explicitly showing and hiding two different logo images (e.g., wordmark-red.png and wordmark-white.png). This can be useful if your "on scroll" logo isn't just a color change but a completely different design, or if the filter method doesn't give you the exact color fidelity you need.
Moeed provided CSS that would manage the display of two logos, which you would typically add to your theme.liquid file, ideally before the closing tag:
Here are the visual results Moeed shared to illustrate this method:


This approach, however, comes with a caveat that Rebekka herself ran into. Moeed's CSS assumes you've already modified your theme's HTML (likely in a file like header.liquid or similar) to include both your red and white logos, each with specific classes like logo-red and logo-white. Without that initial HTML modification, this CSS won't have the elements to target, leading to "nothing changed" or even "both wordmarks showing on top of each other" issues, as Rebekka experienced.
For most store owners looking for a simple color shift, the CSS filter method is generally less intrusive and easier to manage, especially if you're not comfortable diving deep into Liquid files to add new image tags.
Troubleshooting & What to Keep in Mind
Rebekka's journey in the thread really highlighted some common struggles. She mentioned trying various fixes that sometimes worked on the homepage but not other pages, or only on scroll down but not up. These are classic signs of either:
- Incorrect CSS scope: Placing code in a "Custom liquid" section only applies it to that specific page/template. For site-wide changes,
theme.liquidis usually the go-to. - Conflicting styles: Sometimes, existing theme styles might override your custom CSS. Using
!important(as seen in Moeed's code) can force your styles to apply, but it's generally best used sparingly. - Browser caching: Always clear your browser cache or use an incognito window when testing code changes to ensure you're seeing the latest version of your site.
The beauty of the Dawn theme (and modern Shopify themes in general) is their flexibility. With a little CSS magic, you can achieve really impactful visual effects without needing complex apps or heavy development work. It's truly inspiring to see how the community comes together to solve these kinds of challenges, sharing practical code snippets and guiding each other through the process. Thanks to contributors like tim_tairli and Moeed, Rebekka (and now you!) can create a more polished, professional-looking store header.
So go ahead, give it a try! Experiment with the brightness value, see what works best for your brand, and elevate your store's first impression.