Shopware5少文件中的更改无效

时间:2018-09-01 09:55:45

标签: less shopware

我已经安装了Shopware

  1. 从响应主题继承而来
  2. 调整颜色(较少文件)。

这与标头和其他一些组件(例如container.less而不是offcanvas-menu.less一起很好地工作了。

详细信息:

找到要更改的颜色:

为此,我首先使整个商店的所有颜色都独一无二。因此,我可以通过移液器工具轻松点击当前商店的颜色值。

然后,我在源代码中找到颜色值,并将相应的较少源代码组件复制到我的新主题中。只有这样,我才能更改颜色。

复制到themes/Frontend内:

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

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

以下部分:

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

并将背景:#0492d6; 更改为背景:#003E7e; b)内

完整结果:gist MyNewTheme offcanvas-menu.less

但是如果我重新加载并抓取颜色,我会再次得到#0492D6

使用doppelcheck时,我将a)中的颜色更改为background: black;,并将其更改为黑色。

作为另一个doppelcheck,我将themes/Frontend/MyNewTheme/frontend/_public/src/less/_components/container.less中的颜色更改为背景:红色;红色是可见的。

1 个答案:

答案 0 :(得分:1)

请检查是否也将其导入。

请输入您的主题\ Frontend \ MyNewTheme \ frontend_public \ src \ less \ all.less

@import“ _components / offcanvas-menu”;

相关问题