Magento 2 use less/php
lib to compile less to css
first run time i created my style named style.less
in theme directory(web/css)
. Magento 2 compiled my file to pub/static/frontend/VendorName/ThemeName/en_US/css/style.css
then I edit style.less
browser reload nothing change
How to apply new change on style.less
when edit file? command dev:css:deploy not work
2 Answers
First you have to configure compilation of style in admin path given below
Store -> Configuration -> Advanced -> Developer -> Front-end development workflow
change to
Client side less compilation
Then edit your theme styles module wise and other web/css/source
(common style)
app/design/frontend/vendor_name/theme_name
run below command to set developer mode
- php bin/magento deploy:mode:set developer
and clear cache and deploy static-content
- php bin/magento cache:clean
- php bin/magento setup:static-content:deploy
This page in the Magento 2 documentation pretty well covers using Grunt to compile less. http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html
web/css/source
and naming itmodule.less
or_module.less