1

I have created my own custom theme. When customer places an order, order email does not load css correctly. I directly changed in core css files of luma and blank theme but it seems like fall back is not working as magento is not showing my changes even after updating core files.

Any idea why its not loading css or is there any way override email css in my custom theme so that css should be loaded.

0

You can create the following files in your theme to do most of the order-mail styling:

Magento_Sales/web/css/source/_email.less

and

Magento_Sales/web/css/source/_module.less

After making changes to these files, you'll have to do a bin/magento setup:static-content:deploy To make the changes visible.

  • Where to get those two files? I didn't find files in vendor/magento/module-sales/view/frontend/web – umair ayub Jan 30 '18 at 9:55
  • I took them from theme-frontend-blank. vendor/magento/theme-frontend-blank/Magento_Sales/web/css/source/_email.less – Koen Jan 30 '18 at 10:03
  • I placed those files and added my own style in it but it didn't work. – umair ayub Jan 30 '18 at 10:22
  • Hmm, currently I don't have time to try it myself, but have you tried: rm -Rf pub/static/* var/view_preprocessed/* bin/magento setup:static-content:deploy bin/magento cache:clean – Koen Jan 30 '18 at 13:14
  • @umairayub , did you find the solution? – Sunny Rahevar Apr 11 at 7:13

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.