I'm attempting to change the button color in my magento theme. In my app/design/frontend/JK/PPC/web/css/source/_theme.less I have the following:

 * Buttons
@button__color: @color-gray20;

 * Navigation
@navigation__background: @color-white;

The navigation background changes fine, but the button color doesn't change. I've checked in dev tools and I notice it's being overriden by .action.primary

enter image description here

I have nothing in my own code that overrides this. The only files I have under web are web/css/source/_blocks.less (my custom blocks styles), _theme.less and _styles.less which contains:

@import 'source/lib/_lib.less';
@import 'source/_sources.less'; 
@import 'source/_components.less';
@import 'source/_blocks.less';

My theme is based on the blank theme. Any ideas what I'm doing wrong?

1 Answer 1


To answer my own question I should have been overriding:

@button-primary__background: @color-black;
@button-primary__color: @color-white;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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