I want to add few styles in _print.less. I have updated the less file and run the upgrade,deploy commands but still it loads old style. Also clear the cache. How can I do it?

  • did you run command of deployment? – Rakesh Jesadiya Jun 6 '17 at 8:46
  • Yes, already run – Jancy Abraham Jun 6 '17 at 8:59
  • Did you also check after clearing browser cache? – Kaushal Suthar Jun 6 '17 at 9:01
  • What mode is magento running in? – Dominic Xigen May 30 at 22:45

Just run following commands

php bin/magento setup:upgrade

Above command will clear pub content.

php bin/magento setup:static-content:deploy

Above command to deploy static content

php bin/magento cache:flush

Finally flush cache and check.

  • Already run these. – Jancy Abraham Jun 6 '17 at 9:01
  • @JancyAbraham : Did you check after clearing browser cache? – Kaushal Suthar Jun 6 '17 at 9:02
  • Checked,but not working – Jancy Abraham Jun 6 '17 at 9:22
  • If you code is written in between @media print {} then you won't be able to see it's effect on frontend part. Another issue can be is the wrong syntax in LESS file. And last, to thing to check is make sure you are editing in proper file. Please post all details so that I can answer you. – Kaushal Suthar Jun 6 '17 at 9:26
  • I checked this with print option in the compare products. These styles are working when I update the print.css in pub/static. – Jancy Abraham Jun 6 '17 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.