Question

What if i don't declare parent theme in theme.xml while creating new theme in magento 2? will the new theme work properly?

Was it helpful?

Solution

Parent theme is necessary in Magento, if you don't want any parent theme, you can use blank theme as your parent theme:

<parent>Magento/blank</parent>

And this wont be an issue, your theme will work properly if you do this.

See dev docs for details

OTHER TIPS

We can create a new theme without depending any parent theme like Magento blank theme vendor/magento/theme-frontend-blank/theme.xml, the difficulty is you need to write all the look and feel changes from the scratch.

My suggestions is use blank theme as a parent theme, if you totally want to change any layout or build the styles from the scratch for the specific layout, use the parent layout override concept.

I hope it helps.

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