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.

retina_soldout

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:

  1. 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.
  2. 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 your theme.liquid file.

Steps for theme.liquid:

  1. Go to Online Store > Themes.
  2. Find your current theme and click Actions > Edit Code.
  3. In the sidebar, find and click on theme.liquid.
  4. Scroll to the very bottom of the file, just above the tag.
  5. Paste the following code:

This targets the labels for your variant options and, if the associated input has the data-variant-option-available="false" attribute (which Shopify automatically adds for out-of-stock variants), it reduces its opacity to 20%. The !important tag ensures it overrides any other styles.

Here's what Moeed showed as the result:

image

Option 2: Adding a Visual Strike-Through for Extra Clarity

Want to go a step further? tim_1 offered an even more visually striking solution: adding a diagonal line through the out-of-stock variant, combined with the grey-out effect. This really makes it undeniable that an option isn't available.

How to Implement the Strike-Through Effect

Unlike the simple opacity, this CSS snippet uses pseudo-elements (:after), which might not work if pasted directly into a "Custom CSS" box within your theme settings. For this, you'll need to use a "Custom Code" or "Custom Liquid" section if your theme supports it, or add it directly to your theme.liquid file, similar to the previous example.

Here's the combined code for opacity and strike-through:

This code does a couple of things: it applies a slightly higher opacity (0.25) than Moeed's initial suggestion and then uses a linear gradient background on an :after pseudo-element to create that striking diagonal line. The position: relative; on the label and position: absolute; with inset: 1px; on the pseudo-element ensure the line perfectly overlays the variant option.

Here's what that combined effect looks like:

Screenshot 2026-02-04 at 6.38.55 PM

Option 3: The App Route for No-Code Customization

Now, if diving into code isn't your cup of tea, or if you're looking for even more advanced customization beyond simple greying out or striking through, there's always the app route! zulfali jumped into the conversation to highlight "Rubik Variant Image & Swatch," an app designed specifically for enhancing variant display.

Benefits of Using an App like Rubik:

  • No Coding Required: A huge plus if you're not comfortable with CSS or Liquid.
  • Visual Customization: Apps often provide a user-friendly interface to visually indicate out-of-stock variants, change the color of strike-through lines, or even remove them entirely if that's your preference.
  • Seamless Integration: Many variant apps are built to work smoothly with major Shopify themes, fitting naturally into your store's design.
  • Dedicated Support: Apps typically come with a support team ready to help you with setup and customization, which can be a lifesaver.

While an app might come with a monthly subscription, the time saved and the enhanced features could easily justify the cost, especially if you have complex variant needs or prefer a completely visual setup process. It's all about balancing your comfort with code against your budget and desired level of control.

Ultimately, making your product variants clear and easy to understand is a small change with a big impact on your customers' shopping journey. Whether you opt for a quick CSS tweak, a more pronounced strike-through, or a full-featured app, the goal is the same: reduce frustration, improve clarity, and help your customers find exactly what they're looking for. It's awesome to see the community come together to share these practical solutions!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases