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.

asked Jan 30, 2018 at 8:40

1 Answer 1

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.

answered Jan 30, 2018 at 9:08
6
  • Where to get those two files? I didn't find files in vendor/magento/module-sales/view/frontend/web Commented Jan 30, 2018 at 9:55
  • I took them from theme-frontend-blank. vendor/magento/theme-frontend-blank/Magento_Sales/web/css/source/_email.less Commented Jan 30, 2018 at 10:03
  • I placed those files and added my own style in it but it didn't work. Commented Jan 30, 2018 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 Commented Jan 30, 2018 at 13:14
  • @umairayub , did you find the solution? Commented Apr 11, 2019 at 7:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.