Shopify themes, liquid, logos, and UX
How do i make the selected variant button visible? Selecting the variant will make the button invisible, it is confusing to the buyers.
Solved! Go to the solution
This is an accepted solution.
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.product-form__input input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Can you share your store's URL?
offthecourt.store
1. Go to 'Online Store' -> Themes -> Edit Code
2. In the assets folder, locate the file 'section-main-product.css'
3. At the end of the file add this code
/* Product Variant Selected Disappearing Problem */
.product-form__input input[type=radio]:checked+label{
background-color: black;
}
.product-form__input input[type=radio]+label {
border: 1px solid black;
}
Hello @momowt
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.product-form__input--pill input[type=radio]:checked+label {
background-color: rgb(var(--color-foreground)) !important;
color: rgb(var(--color-background)) !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Add this if this code not work then please share your store URL.
Hi, thanks for your suggestion but unfortunately it is not working. The url to my store is offthecourt.store
This is an accepted solution.
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.product-form__input input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Thank you sir! it works!
- Here is the solution for you @momowt
- Please follow these steps:
- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.
<style>
.product-form__input input[type=radio]:checked+label {
background: black !important;
}
</style>
- Here is the result you will achieve:
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
Hey 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, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025