3

I have a question regarding how Magento 2 Less handles _extend.

According to the documentation http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-guide/css_quick_guide_approach.html I can extend a specific component vs overwriting it.

I have a child theme that I'm using Magento/Blank as a parent. I also have a second theme that uses my child theme and I use that for specific category styling.

If I follow the instructions in the documentation and create a file

web/css/source/_navigation_extend.less

and add _navigation_extend.less

to _extend.less, it shows up properly on my child theme. The problem is those same styles aren't applied to my grandchild theme.

Is there something I'm doing wrong? Is there a way to make it work? Thanks!

0

The (grand)child-theme inherits _extend.less (and therefore _navigation_extend.less) from its parent-theme, unless it is overridden in your child theme.

So please make sure your child-theme does not contains one (or both) of these files:

web/css/source/_extend.less
web/css/source/_navigation_extend.less

Because if it does then it is overriding your styling from the parent-theme and it would explain why the styles aren't applied.

Your Answer

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

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