Magento 2 Theming with Grunt / Less Part 1

Magento 2 introduced brand new theme management mechanism. Some of new features are as follows

  • Extending layout files. In Magento 1 we had to copy entire layout xml file to local folder in order to make any changes. But Magento to allow it to extend layout files. Just need copy the part that you want to change. Also it allow you to override entire layout xml as in Magento 1, but it is not recommended.
  • Organized layout structure.¬†Does not allow to add layout files without module folder. Check the folder structure.
  • Less as css compiler.
  • Css / Less inheritance. Less files from parent theme can be changed in custom themes.
Magento 2 theme structure
  • Built in less compiler to make development easier.
  • Css/Less library.

I will be demonstrating how to create and apply new theme in Magento 2 in part 2.

Part 2

Gihan Kavinga

Technical lead at Netstarter PTY Ltd. Magento certified developer plus. Oracle certified professional Business Component Developer. Linux system admin.

Leave a Reply

  • (will not be published)