Magento 2 – How to Change Add to Cart Button Color

addtocartcustomlessmagento2theme

I've successfully changed it once by this.

Cascading style sheets (CSS)

then I want to change it to other colors,
but my new code are not working, the color is still the old one.

I change like this(_theme.less):
from@button-primary__background: @color-orange-red1;
to @button-primary__background: @color-dark-pink1;

I've Flush Magento Cache or Flush JavaScript/CSS Cache,
how can I make it change again untill the color I want?

Best Answer

Please make sure that you are in developer mode and that you cleared the cache. After that clear /pub/static/* and var/view_preprocessed.

Related Topic