Re: Change button styles on product pages

Solved

How can I alter button styles on my product pages?

antoinelacour
Excursionist
43 0 8

Screenshot 2023-12-04 at 17.34.28.png

Hello!

 

See above, I would like change these buttons from rounded to squared, and also remove the drop shadow from the quantity selection element. The same as this reference: https://store.emergencemagazine.org/products/practice-booklet-vol-2

 

The site is www.plantedjournal.shop

 

Any help would be greatly appreciated!

Accepted Solutions (2)

Sweet_Savior_3
Shopify Partner
1335 102 138

This is an accepted solution.

Hello @antoinelacour 

 

Please add below CSS in base.css file

 

product-info .product-form__submit:after {
    border-radius: 0;
    box-shadow: 0 0 0 calc(1px + 0px) rgba(var(--color-button-text),var(--border-opacity)),0 0 0 var(--buttons-border-width) rgba(var(--color-button),var(--alpha-button-background));
}
product-info .product-form__submit:not([disabled]):hover:after {
    box-shadow: 0 0 0 calc(1px + 1.3px) rgba(var(--color-button-text),var(--border-opacity)),0 0 0 calc(var(--buttons-border-width) + 1px) rgba(var(--color-button),var(--alpha-button-background));
}
product-info .quantity:after {
    box-shadow: 0 0 0 1px rgba(18,18,18, 0.55);
    border-radius: 0;
}
product-info .shopify-payment-button__button--branded .shopify-cleanslate [role="button"]{
  border-radius: 0;
}

Sweet_Savior_3_0-1701709925651.png

 

Thanks

 

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!

View solution in original post

Sweet_Savior_3
Shopify Partner
1335 102 138

This is an accepted solution.

Please replace the previous code with the below new code

body product-info .quantity:after {
 box-shadow: 0 0 0 1px rgb(24 79 46 / 0.75);
}

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!

View solution in original post

Replies 7 (7)

Sweet_Savior_3
Shopify Partner
1335 102 138

This is an accepted solution.

Hello @antoinelacour 

 

Please add below CSS in base.css file

 

product-info .product-form__submit:after {
    border-radius: 0;
    box-shadow: 0 0 0 calc(1px + 0px) rgba(var(--color-button-text),var(--border-opacity)),0 0 0 var(--buttons-border-width) rgba(var(--color-button),var(--alpha-button-background));
}
product-info .product-form__submit:not([disabled]):hover:after {
    box-shadow: 0 0 0 calc(1px + 1.3px) rgba(var(--color-button-text),var(--border-opacity)),0 0 0 calc(var(--buttons-border-width) + 1px) rgba(var(--color-button),var(--alpha-button-background));
}
product-info .quantity:after {
    box-shadow: 0 0 0 1px rgba(18,18,18, 0.55);
    border-radius: 0;
}
product-info .shopify-payment-button__button--branded .shopify-cleanslate [role="button"]{
  border-radius: 0;
}

Sweet_Savior_3_0-1701709925651.png

 

Thanks

 

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
antoinelacour
Excursionist
43 0 8

Hi @Sweet_Savior_3 thank you so much! Is it possible to change the colour of the surrounding box of the quantity button? I would like it to be the same faded green #184F2E as the above "Quantity" text.

Sweet_Savior_3
Shopify Partner
1335 102 138

@antoinelacour 

 

Sure, Please add the given CSS

body product-info .quantity:after {
box-shadow: 0 0 0 1px #184F2E;
}

Sweet_Savior_3_0-1701711646699.png

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
antoinelacour
Excursionist
43 0 8

Thank you @Sweet_Savior_3 , but is it actually possible to make the green box slightly opaque like the these other elements ? See below.Screenshot 2023-12-04 at 18.44.46.png

Sweet_Savior_3
Shopify Partner
1335 102 138

This is an accepted solution.

Please replace the previous code with the below new code

body product-info .quantity:after {
 box-shadow: 0 0 0 1px rgb(24 79 46 / 0.75);
}

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
antoinelacour
Excursionist
43 0 8

Thank you so much!

antoinelacour
Excursionist
43 0 8

Hi @Sweet_Savior_3 sorry I just realised there is still the drop shadow. It's very light but still noticeable. Any change we could remove that? Thank you!