Home > Enterprise >  Problem with Dynamic Sendgrid and -webkit
Problem with Dynamic Sendgrid and -webkit

Time:06-04

I had a problem with dynamic templates and the style options of css: "-webkit-line-clamp: 4;" and "-webkit-box-orient: vertical;", when i send the e-mails, the dynamic template removes these styles.

Code

Browser

CodePudding user response:

SendGrid doesn't strip CSS out of your emails for you, but email clients will. Most email clients only support and render a subset of CSS. You can check out the support of email clients for CSS with sites like Can I email... or Campaign Monitor's ultimate guide to email CSS.

However, I couldn't find mention of either -webkit-line-clamp or -webkit-box-orient in either of those references. As far as I understand, email clients have an allow-list of CSS properties, so if those two aren't mentioned by the online references and appear stripped from your email, then neither are currently supported by the email clients you are testing in.

The only advice here is to limit your CSS to relatively simple CSS or check with Can I Email... to see if the CSS you want to use is supported.

  • Related