Search code examples
cssmagentomagento2magento-2.0

Is it possible to have use vanilla CSS files in Magento 2 via a child theme?


I understand that it's built to compile .less files, but I'd really like to be able add vanilla CSS files in a nice way.


Solution

  • Yes this is absolutely possible. The less files just get compiled into css in the pub directory. To add your own static css files you will just put them in your css directory (/app/design/frontend/{vendor}/{theme}/web/css) and they will be accessed just like any less compiled css file.

    Depending on your magento configuration you may need to first run bin/magento setup:static-content:deploy from your magento installation's root directory.