Email-builder / grunt-email-builder

Build Emails from HTML / CSS code in grunt
Other
94 stars 14 forks source link

Process Outlook conditional HTML #50

Open darkv opened 8 years ago

darkv commented 8 years ago

Adding a CSS class to a tag will result in an inline style attribute after processing. Alas to get correct display of HTML emails in Outlook you often have to put in additional HTML code targeted to Outlook only by adding something like

<!--[if mso]>
    only for Outlook
<![endif]-->

If you have tags within this part unfortunately the CSS class -> CSS inline style conversion is not executed. Sure it is looks like a normal HTML comment for the processor but it could be extended to detect those special mso parts. For bigger HTML files those mso parts can be quite extensive and the usage of CSS classes would help save a lot of time.