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


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.


Use this way to call css file in email template


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

Please check this out


I hope this might help you


  • 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.