Applying new CSS to the CompStore theme
A CompStore theme inherits the Luma theme, which in turn inherits a blank theme, as shown here:
Once you have to make changes in CompStore in order to customize the new theme, you can think about the functionalities already available in the other themes to apply your changes.
The vendor
directory under the Magento 2.0 root directory handles all the native Magento modules and themes. The Magento blank and Luma themes, which you have been working on until now, are available in vendor/magento/theme-frontend-blank
and vendor/magento/theme-frontend-luma
, respectively. So, the CompStore theme "receives" all the features of the themes under these folders. It's important to fix these basic concepts to understand the context that you inserted when you developed a Magento theme solution.
Once you have a solid concept about the behavior, let's create a custom .css
file for the CompStore theme:
Copy the
packt/vendor/magento/theme-frontend-blank/web/css/_styles.less...