What's your biggest current challenge? Have your say in Community Polls along the right column.

How can I alter the color of a variant pill on my site?

Solved

How can I alter the color of a variant pill on my site?

basicbastardco
Pathfinder
171 1 31

 

Hey guys, how can I change the colour of this variant pill (Size and color)? 

 

 

URL https://basicbastard.co/

 

 

Screenshot 2022-09-03 at 9.31.12 PM.png

Liaz
Accepted Solution (1)

made4Uo
Shopify Partner
3856 717 1199

This is an accepted solution.

Hi @basicbastardco,

 

If you are trying to change the background of the variant pills, see image below. You can follow the instructions here.

made4Uo_0-1662243712885.png

 

 

1. From your Admin store, go to Online store > Themes > Click Actions > Edit code
2. Open the Asset folder, and find the base.css file. 
3. Add the code below.

 

NOTE: You can change color blue

.js.product-form__input input[type=radio]:checked+label {
    background-color: blue;
}

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free

View solution in original post

Replies 7 (7)

Sho2guru
New Member
70 0 0

Hello,

can you provide your store details so i can help you with that?

banned

PageFly-Victor
Shopify Partner
7865 1786 3120

Hi @basicbastardco !

 

This is PageFly - Advanced Page Builder. I would love to give you some recommendation.

 

And please paste this code at the bottom of section-main-product.css under assets in theme code files;

 

fieldset.product-form__input .form__label {
margin-bottom: 0.2rem;
color: coral !important;
}

 

Screenshot_23.png

You can change color as you want.

 

Best Regards;

Pagefly

made4Uo
Shopify Partner
3856 717 1199

This is an accepted solution.

Hi @basicbastardco,

 

If you are trying to change the background of the variant pills, see image below. You can follow the instructions here.

made4Uo_0-1662243712885.png

 

 

1. From your Admin store, go to Online store > Themes > Click Actions > Edit code
2. Open the Asset folder, and find the base.css file. 
3. Add the code below.

 

NOTE: You can change color blue

.js.product-form__input input[type=radio]:checked+label {
    background-color: blue;
}

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
thetrinketclub
Visitor
2 0 0

 Very helpful thank you 🙂 

GPCS
New Member
13 0 0

Hello, @made4Uo . 

 

I was wondering how I can do this for all the variant pills because it only worked on 1 variant pill so far. Please see the screenshot below for reference. Thank you!

GPCS_0-1682048671249.png

 

vera_p
Tourist
13 0 1

Hi! 

This helped me a lot in changing the variant colors as well.

With this, I could also change the border of the variant pill button.

How can I change the label color? What is the code?

 

I have tried but somehow it does not work 🙂 

webkit-text-fill-color: #FFFFFF;

 

Thanks!

protofab4x4
Visitor
1 0 0

Thank you this was perfect! Is it possible to change the text color on the highlighted variant pill as well?