Question

I've created a theme at:

app/design/frontend/<vendor>/default

That I call my "default" theme with some base styles, that inherit from Magento Blank as it's parent. Default just has universal styles that all of my other themes will use.

In the default theme, I'm using:

app/design/frontend/<vendor>/default/web/css/source/_extend.less

An _extend.less file to extend from the parent Magento Blank theme.

Now, I also have different stores in Magento, so building off of the default theme, I have:

app/design/frontend/<vendor>/shop1

app/design/frontend/<vendor>/shop2

And I'm seeing that if I put in an _extend.less into

app/design/frontend/<vendor>/shop1/web/css/source/_extend.less

That doesn't appear to be working. The shop1 theme is using default as it's parent, and is correctly inheriting the styles of default. However, shop1 is not being extended by any customizations that I'm placing into it's _extend.less file. Am I doing something wrong here?

Thank you.

Was it helpful?

Solution

You can create new less file for your shop1 theme

/app/design/frontend/Vendor/shop1/web/css/source/shop1.less

Override below file in your theme

/vendor/magento/theme-frontend-blank/web/css/source/_sources.less

Import your less file in source.less

/app/design/frontend/Vendor/shop1/web/css/source/_sources.less

Like this @import '_shop1.less';

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