Email Enhancement - Automatic Inlining of CSS Rules

Email Enhancement - Automatic Inlining of CSS Rules

Making emails work consistently across clients is notoriously difficult, and one of the most popular platforms, Google App / GMail, only allows for inline CSS (CSS style rules embedded directly in each HTML element).

This can be very difficult to maintain, especially if you have CSS rules for links and have non-technical people editing your emails who might just copy and paste into an editable filed, versus editing the link href and text values. This scenario and many others can disturb, change or remove your inline styles that exist as children of the marketo editable HTML nodes.

The solution is to have the option to have Marketo automatically inline all CSS rules prior to any send. This could be a checkbox in the email settings for an email item.

This is not difficult and infact I believe it already exists in other platforms. There are definitely working examples out there in the wild, so this should be pretty easy from an engineering standpoint. The UX work is drop dead simple -- just add a checkbox to settings.

Here's one example from MailChimp:
http://beaker.mailchimp.com/inline-css

Here's another example:
http://premailer.dialect.ca/

Here's another example in PHP:
https://github.com/tijsverkoyen/CssToInlineStyles

This change would literally save us hours and hours of work each month, plus allow us to deliver a more consistent and high quality customer experience to our subscribers. Other enterprise email vendors already do this. Marketo, please prioritize this -- you seem to be behind the times in this department.

12 Comments

I have noticed a small issue with the template inliner:

This:

<html>

  <head>

    <title>Test</title>

    <style type="text/css">

      .body-text {

      font-family: 'Open-Sans', Helvetica, Arial, sans-serif;

      }

    </style>

  </head>

  <body> 

    <p class="body-text">

      Sample Text

    </p>

  </body>

</html>

Compiles to this:

<html>

  <head>

    <title>Test</title>

    <style type="text/css"></style>

  </head>

  <body>

    <p class="body-text" style="font-family: &quot;Open-Sans&quot;, Helvetica, Arial, sans-serif; "> Sample Text </p>  <!-- Issue with single quotes encoded -->

  </body>

</html>

Community Manager
Status changed to: Open Ideas