Making Sold-Out Shopify Variants Crystal Clear: A Community Guide to Visual Cues
Hey there, fellow store owners! Let's talk about something super common that can make or break a customer's experience on your product pages: clearly showing what's in stock and what's not. We recently saw a fantastic discussion pop up in the Shopify Community, started by kinddogshop, a store owner running a charming dog-themed shop with their Retina theme. Their challenge? When customers clicked through different sizes and colors of a sweater, it was hard to tell which combinations were actually available. Sound familiar?
This isn't just a minor detail; it's a crucial part of user experience. Imagine a customer falling in love with a product, only to click through variants and realize their preferred size and color isn't available, with no clear visual cue. Frustrating, right? That's exactly what kinddogshop was trying to fix, and the community rallied with some excellent solutions. Let's dive into how you can solve this for your own store, drawing on the wisdom shared by our peers.
Start with the Basics: Your Theme Settings
Before you even think about code, the first place to check, as Maximus3 wisely pointed out in the thread, is your theme settings. Many modern Shopify themes offer built-in options for how out-of-stock variants are handled. You'll usually find these under your theme customizer, likely in a "Product" or "Product Pages" section.
kinddogshop confirmed that for their Retina theme, the "Hide sold-out variants" option was already set to "Disabled" (which is what you want if you wish to show the variants but visually mark them as unavailable). This is a great starting point, as it ensures all options are visible, even if out of stock. If your theme has a similar setting, make sure it's configured to not hide sold-out variants if your goal is to grey them out or strike them through. One community member, oscprofessional, initially suggested a CSS snippet for hiding the last child, but the goal here is to visually indicate without removing the option entirely, so we'll focus on methods that keep them visible.

Option 1: The Quick & Clean CSS Grey-Out
Once you've confirmed your theme isn't hiding anything, it's time for some CSS magic! The community quickly converged on a super effective and elegant solution using a simple CSS snippet. Moeed's contribution, which kinddogshop confirmed worked "SO nicely," is a fantastic starting point. It simply reduces the opacity of unavailable variants, making them appear greyed out.
How to Implement the Opacity Grey-Out
You have a couple of options for adding this CSS:
- Via your Theme Customizer's Custom CSS: As tim_1 suggested, for simple CSS like this, often you don't even need to touch your theme files directly. Head to Online Store > Themes > Customize. Then look for "Theme settings" (usually a gear icon or similar) and find a "Custom CSS" or "Advanced CSS" section. Paste the code there.
- Directly in
theme.liquid: If your theme doesn't have a Custom CSS box, or if you prefer this method, you can add it to yourtheme.liquidfile.
Steps for theme.liquid:
- Go to Online Store > Themes.
- Find your current theme and click Actions > Edit Code.
- In the sidebar, find and click on
theme.liquid. - Scroll to the very bottom of the file, just above the

