SL5net
SL5net

Reputation: 2556

Changes in Shopware5 less-file has no effect

I've installed Shopware

  1. inherited from the responsive theme and
  2. adjusting the colors (less-files).

This worked well with the header and a few other components like container.less but not offcanvas-menu.less.

In Detail:

finding the color to change:

For this I first made all colors of the entire shop unique. So I can easily tap the color value over the current shop via a pipette tool.

Then I find the color value in the source code and copy the corresponding less source code components into my new theme. Only then do I change the color.

copied inside themes/Frontend :

a) /Responsive/frontend/_public/src/less/_components/offcanvas-menu.less too

b) /MyNewTheme/frontend/_public/src/less/_components/offcanvas-menu.less

the following part :

.sidebar--navigation {
    .border-radius();
    background: #0492d6;
    .navigation--entry {
        &:last-child {
            border-bottom: 0 none;
        }
    }
    .navigation--link {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

and changed background: #0492d6; to background: #003E7e; inside b)

Complete result: gist MyNewTheme offcanvas-menu.less

But if i reload and grap the color i got again #0492D6.

As doppelcheck i changed the color in a) to background: black; and its black.

As another doppelcheck i changed the color in themes/Frontend/MyNewTheme/frontend/_public/src/less/_components/container.less to background: red; And red is visible.

Upvotes: 0

Views: 145

Answers (1)

interex64
interex64

Reputation: 26

Please check if you also imported it.

Please enter in your themes\Frontend\MyNewTheme\frontend_public\src\less\all.less

@import "_components/offcanvas-menu";

Upvotes: 1

Related Questions