I'm using Magento version 2.2.0 to create a custom email template for my custom extension, I need to add inline CSS to the email template, I've followed the instruction here , so my email template file look like this:
<!--@subject Custom E-mail @--> <!--@vars { "var this.getUrl($store, 'admin')":"Warehouse Account URL", "var customer.email":"Customer Email", "var customer.name":"Customer Name" } @--> {{template config_path="design/email/header_template"}} <!-- pathe of template header--> {{inlinecss file="css/email-inline.css"}} <table> <tr class="email-intro"> <td> <p class="greeting"> {{trans 'Dear %dear,' dear=$dear |raw}} </p> </td> </tr> <tr class="email-summary"> <td> <p> {{var message |raw}} </p> </td> </tr> <tr class="email-information"> <td> {{var content |raw}} </td> </tr> </table> {{template config_path="design/email/footer_template"}} <!--footer of template--> My file location for CSS code
app/code/Namespace/Module/view/frontend/web/css/email-inline.less