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:

  1. 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.
  2. Assets → base.css (or theme.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 (or theme.css depending on your Dawn version).
    • Scroll to the very bottom of the file and paste the CSS.
    • Save your changes.
  3. theme.liquid file (just before ):
    • Go to Online Store → Themes.
    • Click the "..." button next to your Dawn theme, then select Edit code.
    • Find the theme.liquid file under the "Layout" folder.
    • Scroll to the very bottom of the file, just above the closing tag.
    • Add the CSS wrapped in

Important Troubleshooting Tips

A couple of crucial tips also emerged from the discussion. @Hridoy_ShopifyDev and @Kyvern1 rightly pointed out that you might need to:

  • Clear your browser cache (or test in an incognito window) after saving changes. Browsers love to hold onto old styles!
  • If the colors still aren't sticking, use your browser's Developer Tools (right-click on the element → 'Inspect'). This lets you examine the selected pill and confirm the exact class names Globo (or any app) is using, as they can sometimes vary slightly between app versions. This is your secret weapon for debugging!

What a fantastic example of the power of the Shopify community! peterotoole's initial struggle was a perfect learning opportunity for everyone. The big takeaway here? If you're customizing your Shopify store and something isn't responding to standard theme CSS, always consider if an app might be taking over that specific UI element. A quick check of your installed apps, followed by a little detective work with browser DevTools, can save you hours of frustration and help you get those variant pills looking exactly right for your brand!

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools