Shopify themes, liquid, logos, and UX
I'm looking to change the background colour and font colour for both the "Sold Out" and "Add to Cart" buttons (not sure of their technical name) on a product page.
I'd like to make the following changes.
ADD TO CART
Background: #EFEFEF
Text: FFFFFF
SOLD OUT
Background: #EFEFEF
Text: FFFFFF
You can look at the site I'm working on here https://charliepickles.shop/products/oh-my-heart-calming-mask
The theme is Pipeline.
There is no base.css file, though there is theme.liquid and custom.css. I mention these as a lot of what I've researched mentions them.
Solved! Go to the solution
This is an accepted solution.
got it, i add some comment so it will be easier for you to change it.
<style>
/* this is for the sold-out */
.variant--soldout .btn--add-to-cart {
background: pink;
}
.variant--soldout .btn-state-ready {
color: black;
}
/* This is for the add to cart button. */
.btn--outline.btn--full.btn--primary.btn--add-to-cart {
background: red;
}
.btn--add-to-cart .btn-state-ready {
color: white;
}
</style>
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Hi @YukonPete
The result of the color you choose is like this.
On the sold out it okay but on the add to cart its not adviceable.
Hey, yeah that's fair. Just what was asked of me but I'll update the colours. Question still stands, if anyone can help 🙂 I can change up the hex later.
This is an accepted solution.
got it, i add some comment so it will be easier for you to change it.
<style>
/* this is for the sold-out */
.variant--soldout .btn--add-to-cart {
background: pink;
}
.variant--soldout .btn-state-ready {
color: black;
}
/* This is for the add to cart button. */
.btn--outline.btn--full.btn--primary.btn--add-to-cart {
background: red;
}
.btn--add-to-cart .btn-state-ready {
color: white;
}
</style>
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Hey, thank you that worked out perfectly! The only question I have is regarding using a colour #. If I write blue, red, white, etc I can update the colours, but when I put in a hex such as FF8080, it defaults to the theme colour scheme. Any advice?
did you write it correctly?
I thought so, but I must be missing something.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025