0

How can I change color add to cart button in Magento 2 ??

  • You want to change color of add to cart button , right ? – Manoj Deswal Jun 19 '18 at 12:55
  • yes I want to change color add to cart button – shohel hussain Jun 19 '18 at 12:56
  • One way is overriding your styles in your custom theme at this location ="\app\design\frontend\vendor\theme\web\css\source_extend.less" – Manoj Deswal Jun 19 '18 at 12:59
  • ok manoj sir I will try – shohel hussain Jun 19 '18 at 13:02
  • Any solution worked for you ? – Pawan Jun 19 '18 at 16:32
1

Add your css:

.action.primary.tocart {
    background: #222;
    border-color: #222;
    color : #fff;
}
| improve this answer | |
  • hello i am creating _extend.less file in app/design/frontent/magestore/sample/magento_theme/web/css/source/_extent.less file and i am adding your code but button color is not change – shohel hussain Jun 19 '18 at 13:08
  • Can you run this commands php bin/magento setup:upgrade php bin/magento setup:static-content:deploy en_US deploy as store wise like en_US php bin/magento cache:flush – Magento Developer Jun 19 '18 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.