0

I want to write certain css for my email templates. How can i do that. Please tell me how should i make a custom css file for email templates and include it in my email template content https://prnt.sc/10ov9rl

1

Don't need to create CSS. You just add your style in the _email.less file which located below path.

app/design/frontend/{{YOUR THEME NAME HERE}}/default/web/css/source/_email.less

After that, you have to run commands.

Note: Whenever you change anything into the _email.less file you have to run the commands.

Let me know if you still facing any issues.

0

Use this way to call css file in email template

Vendor_Module::css/filename.css

{{css file="Magento_Sales::css/filename.css"}}
1
  • Have you tried this? How can i call the css file which is thr in my custom theme? – Nafsss Mar 18 at 10:53
0

Please check this out

https://nwdthemes.com/2018/05/25/how-to-style-email-templates-in-magento-2/

I hope this might help you

Thanks

1
  • Already referred this. But did not understand anything – Nafsss Mar 18 at 10:53

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.