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.
1 Answer 1
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/webumair ayub– umair ayub2018年01月30日 09:55:13 +00:00Commented Jan 30, 2018 at 9:55
-
I took them from theme-frontend-blank. vendor/magento/theme-frontend-blank/Magento_Sales/web/css/source/_email.lessKoen– Koen2018年01月30日 10:03:00 +00:00Commented Jan 30, 2018 at 10:03
-
I placed those files and added my own style in it but it didn't work.umair ayub– umair ayub2018年01月30日 10:22:17 +00:00Commented 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:cleanKoen– Koen2018年01月30日 13:14:20 +00:00Commented Jan 30, 2018 at 13:14
-
@umairayub , did you find the solution?Sunny Rahevar– Sunny Rahevar2019年04月11日 07:13:48 +00:00Commented Apr 11, 2019 at 7:13
Explore related questions
See similar questions with these tags.