Change format of Variant selection button

Hi there,

I’m looking to make a change to the format of the variant selection button but can’t see how to do that in the coding. Right now it is only the border colour that distinguishes the selection made by the customer.

Instead I would like the fill colour of the button selected to change too, so it is easy to distinguish what has been selected.

This is the current view:

However I would like the button to look like this when selected:

Here is the link to the page: https://www.conscious.cleaning/products/toilet-cleaner?variant=41325603553479

Thanks so much,

Lyndsay

Hi @lyndsayR

Hello

To change format of Variant selection button, add this code to your theme.scss or theme.css file.

Navigate to online store >> Click edit theme code.

Now find theme.scss or theme.css and paste the following code:

.radio__fieldset .radio__button input:checked~label {
    background: #008cb4 !important;
}

After adding the CSS you see the changes.

I hope it will be helpful for you.

Thanks

Did it solve your issue?

- If yes, Like & Mark As Solution to help the community

- If not, let me know. also share a screenshot of the code that you added.

Please add below code in bottom of assets/theme.css file.

.radio__fieldset .radio__button input:checked~label {
background: #369694;

}
Thank you.

Thanks so much for sharing this code! It worked perfectly.

Do you know how I go about changing the font colour to white when it’s selected so it matches the Add to Cart button?

Thanks so much again!

Lyndsay

Please add below code in bottom of assets/theme.css file.

.radio__fieldset .radio__button input:checked~label{
color: #fff;

}
Thank you.

Thank you so much! This has fixed the problem perfectly!