I am pretty new to Magento2 and my question may sound banana to most of you. I would like to know how can I compile my less file.
app/design/frontend/my_theme/web/css/source/_layout.less
thank you so much in advance
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI am pretty new to Magento2 and my question may sound banana to most of you. I would like to know how can I compile my less file.
app/design/frontend/my_theme/web/css/source/_layout.less
thank you so much in advance
Remove var and pub/static folder and deploy static content again as per below commands.
rm -rf var/ pub/static/
php bin/magento setup:static-content:deploy
chmod -R 777 var/ pub/static/
Just run php bin/magento setup:static-content:deploy
from your project root folder.
You might have to remove contents of pub/static
or to be more granular affected files by your changes.
Source: The official docs http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.html
Also if you want GRUNT
to watch your changes see this
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html
In development environment you can also created symlinks as stated here http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-less-sass.html
Also you should take into consideration the possibility that your logic for adding the less
file is faulty. Here are the official docs for adding style custom changes
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-guide/css_quick_guide_approach.html