Question

I'm relatively new to this, so i hope someone can help me out.

In my store i have a child theme of blank. The changes in this child theme get properly displayed on the store front and everything not changed is inherited from blank (as it should be).

Now i need another child theme of this child theme to make some additional changes for specific sites in _theme.less. So i tried to create a child theme that inherits from my first child theme that inherits from blank. But the result is that it does not inherit the changes i made in _theme.less in the first child theme. New changes in _theme.less work but everything else is inherited from blank instead of the child theme of blank.

If i delete _theme.less in the child-child-theme it displays everything as changed in the first child theme. So i think the problem is that the new _theme.less overrides the _theme.less from it's parent completely. Shouldn't the child-child theme inherit everything from the child theme's _theme.less except when it is changed in it's own _theme.less?

Would be great if someone could show me a way out of this problem.

Was it helpful?

Solution

Because you have a CSS file with the same name in your childchild theme it TOTALLY overwrites and replaces the CSS in the child theme. Therefore change the name of the CSS file in the childchild theme and both will load.

EDIT you will also need to reference the new file name in your childchild theme in the _extend.less file with

@import 'myname.less';

More info here as well less files - magento.stackexchange

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top