I have a problem with a custom theme in Magento. I am trying to change some variables for less. But nothing that i change has any effect on the output css.

I followed https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-guide/css_quick_guide_mode.html or https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css-overview.html to change the variables. But is has no effect.

I cleared all the caches (cache:clean & cache:flush), deleted all fiiles in pub/static/* and did re-deploy all static files for the theme.

Basically i have a simple theme inheriting from Luma theme (<parent>Magento/luma</parent>). All my other changes, custom js, css and a custom of layout changes in Magento_Theme/layout/default.xml appear just fine. The files i created:


.action {
    &.primary {
        color: red;


@button-primary__color: @color-white;
@button-primary__hover__color: @color-white;
@button-primary__background: @color-orange-red1;
@button-primary__hover__background: @color-orange-red4;
@button-primary__border: 1px solid @color-orange-red2;
@button-primary__hover__border: 1px solid @color-orange-red2;

I have Magento 2.2.6, Server-Side Less Compilation is set.

EDIT SOLVED: Sorry to bother you guys. Somehow i needed to manually remove var/view_preprocessed directory in order to make changes appear. That's only half documented in the links i provided...

  • Do you use varnish for caching by any chance? If so, flush varnish cache too. – Greg Nov 2 '18 at 15:21
  • 1
    Thank you for your help. Actually i think it was my bad. Somehow i needed to manually remove var/view_preprocessed. – patman Nov 3 '18 at 10:47

Your Answer

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

Browse other questions tagged or ask your own question.