How can I change button fill animation across my entire site?

How can I change button fill animation across my entire site?

blakelyhi
Explorer
97 1 5

I would like for the buttons across the entire site to fill at once when hovered over (like they do on this site: https://thearrivals.com/) and not with the gradual left to right gradient as it currently is - can anyone help to target this with code? Not having luck, thank you in advance!

 

url: https://afca7f-2.myshopify.com/

Replies 7 (7)

Asad24
Shopify Partner
180 36 33

Go to your online store -> customize -> settings -> custom css 
and paste this code in the custom css section

.btn.btn--secondary.btn--overlay:before, .spr-button-primary.btn--overlay:before {
display: none !important;
}
banned
blakelyhi
Explorer
97 1 5

Thank you, that did not work to achieve what I need though. The buttons still fill from left to right when hovered on though and I want to remove that. This is an example website of button fill we are trying to emulate: https://thearrivals.com/

Made4uo-Ribe
Shopify Partner
8417 2015 2470

Hi @blakelyhi 

Try this one.

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

.btn.btn--primary.btn--overlay:after, .shopify-challenge__button.btn--overlay:after {
    background-color: white !important;
}

 

  • And Save. 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

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.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
blakelyhi
Explorer
97 1 5

Thanks but that did not achieve what I need. I don't mind the fill color so much as the animation of the fill (the clip in from left to right) - so now unless every button is the color specified in the code, I still see that white background clip in which is what I'm trying to eliminate.

PageFly-Richard
Shopify Partner
4668 1069 1726

Hi @blakelyhi 

This is Richard from PageFly - Shopify Page Builder App, I’d like to suggest this idea:
Online Store ->Theme ->Edit code
Assets ->Theme.css

.btn.btn--primary.btn--overlay:after, .shopify-challenge__button.btn--overlay:after {
    background-color: #fff !important;
}

Hope you find my answer helpful!
Best regards,
Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

blakelyhi
Explorer
97 1 5

Thanks but that did not achieve what I need. I don't mind the fill color so much as the animation of the fill (the clip in from left to right) - so now unless every button is the color specified in the code, I still see that white background clip in which is what I'm trying to eliminate. 

PageFly-Richard
Shopify Partner
4668 1069 1726

Hi @blakelyhi Please help me replace the code above with this one:

.btn.btn--primary.btn--overlay:hover ::before,.btn.btn--primary.btn--overlay:hover ::after, .shopify-challenge__button.btn--overlay:hover ::before,.shopify-challenge__button.btn--overlay:hover ::after{
    background-color: #fff !important;
}

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.