Unlocking Custom Variant Pill Colors in Shopify Dawn: A Deep Dive (and Why Your App Might Be the Key!)
Hey fellow store owners! Ever hit a wall trying to tweak something in your Shopify theme, especially when it seems like a simple visual change, like adjusting a button color? You're definitely not alone! I recently followed a fantastic discussion in the Shopify community that perfectly illustrates this common challenge, and it's a goldmine of insights, particularly if you're rocking the Dawn theme.
The Mystery of the Unchanging Variant Pills
Our friend @peterotoole kicked things off, asking how to change the variant pill colors across their store in the Dawn theme. They'd tried "countless ways" but couldn't get those little buttons to budge from black to a lovely blue (specifically, #6dc3e8). Sounds frustratingly familiar, right? Here's a peek at what they were seeing:
Dawn's Native Variants vs. The App Overdrive
At first glance, if you're using Dawn's native variant picker, the initial advice from the community was spot on. The @ai-theme-code-editor suggested heading to Assets → base.css (or your main stylesheet) and adding some CSS targeting the default Dawn selectors:
/* Default */
.product-form__input input[type="radio"] + label {
background: #ffffff;
color: #000000;
border: 1px solid #000000;
}
/* Hover */
.product-form__input input[type="radio"] + label:hover {
background: #e6e6e6;
}
/* Selected */
.product-form__input input[type="radio"]:checked + label {
background: #000000;
color: #ffffff;
border-color: #000000;
}
This is solid advice for a pure Dawn setup. But here's where the community really shone and identified the core issue! Multiple folks, including @Steve_TopNewYork, @Kyvern1, and @tim_tairli, quickly spotted the real culprit: peterotoole's store wasn't using Dawn's default variant picker at all! Instead, it was powered by an app called Globo Product Options / Globo Swatches.
This is a super common scenario on Shopify. Many apps enhance or completely replace core theme functionalities. When they do, they often inject their own HTML and CSS, which means Dawn's default selectors won't apply. You need to target the app's specific CSS classes instead.
The Solution: Targeting Globo Product Swatches
So, the key was to find the right CSS selectors for Globo. Several community members, including @irtevo and @Moeed, shared variations of the code needed. The most robust approach, incorporating insights from @Kyvern1 and others, targets the selected state of Globo's swatches:
Custom CSS for Globo Swatches
To change the selected variant pill from its default (black) to the desired blue (#6dc3e8) with white text, add the following CSS:
/* Selected Globo Product Swatch */
.globo-swatch--selected,
.globo-swatch input:checked + label,
.globo-product-option .selected,
.globo-swatch-product-detail ul.value li.select-option input:checked + .globo-style--button,
.globo-product-options .globo-style--button.active {
background: #6dc3e8 !important;
border-color: #6dc3e8 !important;
color: #ffffff !important; /* Optional for better contrast */
}
Notice the !important tag. This is often necessary when overriding styles injected by an app, as their CSS might have higher specificity or be loaded later.
Where to Add the Custom CSS
Now, where do you actually put this magic CSS? The community offered a few excellent options, each with its own pros and cons:
-
Theme Settings → Custom CSS:
- Go to Online Store → Themes.
- Click Customize next to your Dawn theme.
- In the bottom left corner, click on Theme settings (the gear icon).
- Look for a section like Custom CSS (this is often the cleanest place for small snippets).
- Paste the code there and save.
-
Assets →
base.css(ortheme.css):- Go to Online Store → Themes.
- Click the "..." (three dots) button next to your Dawn theme, then select Edit code.
- In the "Assets" folder, find
base.css(ortheme.cssdepending on your Dawn version). - Scroll to the very bottom of the file and paste the CSS.
- Save your changes.
-
theme.liquidfile (just before
