Within StoreFrame Framework, we still use the default Magento 2 LESS compilation. We believe that by keep using LESS compilation (although slow) this complies and compile complex LESS file dependencies pretty good. Therefore we have made only small adjustment to add extra layer of dependency to it.
StoreFrame Framework theme-base override the LESS file located here (override from blank theme)
An example of what we have added to the file (for reference)
@import (reference) 'source/_base_extends.less';
//@magento_import 'source/_base.less'; // Base Theme blocks
Child Theme, grunt-config.json
For every StoreFrame Framework we have delivered, we make sure that a child theme is also installed within your Magento app directory. This enables you as a developer to create override and or to extend Magento 2 project. Therefore we have also made adjustment to the grunt-config.json of Magento 2 to compile the child theme.
To compile child theme
LESS Compilation Breaks During Static Content Deploy
We have noticed that some developer would create a new modules and for some reason break during static content deploy LESS compilation. Most of this cases appear due to using a variable defined within the child or base theme and not re-declaring the variable within the module it’s self. Hence it’s important to always add or make dummy variable declaration within each custom modules LESS files.