Grey Out Sold-Out Variants: The Easy Way to Improve Your Shopify Store's UX
Making Sold-Out Variants Clearer: A Community Discussion
Hey everyone! I was browsing the Shopify Community forums the other day and came across a really common question: how to visually indicate sold-out variants on a product page. User @kinddogshop, who runs Red Bark Shop, a dog-themed store, was having this exact issue with their Retina theme. They wanted to make it super clear to customers which sizes and colors of their sweaters were currently unavailable. Let's dive into the solutions the community offered!
The problem, as @kinddogshop described it, was that customers had to click through all the variants to see what was actually in stock. Not a great user experience, right?
Here's the original question:
I’m using the Retina theme and run a dog themed shop where there are sizes and colors for a certain sweater.
It’s really hard for a visitor to identify visually what is in stock by clicking on the variants. Is there a way to either grey out or strike out availability when something is out of stock?
Let's see what the community came up with.
Theme Settings and Quick Fixes
First off, @Maximus3 suggested checking the theme settings. This is always a good first step! Many themes have built-in options for handling sold-out variants. They even included a screenshot of a setting that looked promising:

Turns out, @kinddogshop already had the "Hide sold-out variants" setting disabled, which is what they wanted (they didn't want to hide them, just visually indicate they were out of stock).
Then, @oscprofessional chimed in, confirming that the Retina theme doesn't handle this visually by default and suggested a CSS tweak. They recommended keeping "Hide sold-out variants" off and adding CSS to grey out or strike out the options. Here's the initial CSS snippet they suggested:
.options-selection__option-values .options-selection__option-value:last-child {
display: none;
}
However, this code didn't quite solve the problem, as @kinddogshop was looking for a way to grey out or strike out the unavailable options, not hide them completely.
CSS Solutions for Greying Out and Striking Through
This is where things got interesting! @Moeed provided a CSS solution to grey out the unavailable variants. They suggested adding this code to the bottom of the theme.liquid file, just above the