Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Building Modern Emails

Building Modern Emails

Let's learn about emails! This presentation has three parts:
1) Brief history of email (or, how did we get here?)
2) State of email in 2016 (or, why is email so complicated?)
3) Building good emails (or, how do we get around these complexities?)

Billy Roh

June 16, 2016
Tweet

More Decks by Billy Roh

Other Decks in Technology

Transcript

  1. Douglas Crockford Major JavaScript contributor, creator of JSON The Web

    is the most hostile software engineering environment imaginable., second to email.
  2. The Web is the most hostile software engineering environment imaginable,

    second to email. Douglas Crockford Major JavaScript contributor, creator of JSON
  3. email_complexity = operating_systems * browsers * email_clients Windows macOS iOS

    Android … IE Chrome Safari Firefox … Mail.app Android Mail Gmail.com Outlook.com …
  4. 33% 16% 11% 9% 8%
 7% Mail for iPhone Gmail

    for web Mail for iPad Mail for Android Mail for macOS Outlook for Windows http://emailclientmarketshare.com/ Percentage Cumulative 33% 49% 60% 69% 77%
 84%
  5. • Paste in your markup. • Test on all OS,

    email client combinations. • Helpful for replicating client- specific bugs. Litmus
  6. Want Lotus Notes 7 on OS X 10.10? Sure, why

    not. http://www.joelamantia.com/images/blog/angry_red_micro_notes.png
  7. .parent .child .child .parent { padding: 20px; } .child +

    .child { margin-top: 20px } On the web
  8. • Padding and margins don’t work in Outlook. • Negative

    margins don’t work in Gmail. Gotcha!
  9. table.parent tr td.h-spacing-small td table.parent-content td.h-spacing-small Part 1: Horizontal spacing

    table.parent td.h-spacing-small td.h-spacing-small table.parent-content
  10. Part 1: Horizontal spacing td.h-spacing-small { width: 20px; } table.parent

    td.h-spacing-small td.h-spacing-small table.parent-content
  11. table.parent-content: tr: td table.v-spacing-small: tr: td table.child table.v-spacing-small: tr: td

    table.child table.v-spacing-small: tr: td Part 2: Vertical spacing table.parent-content
  12. table.parent-content: tr: td table.v-spacing-small: tr: td table.child table.v-spacing-small: tr: td

    table.child table.v-spacing-small: tr: td Part 2: Vertical spacing table.parent-content table.v-spacing-small
  13. table.parent-content: tr: td table.v-spacing-small: tr: td table.child table.v-spacing-small: tr: td

    table.child table.v-spacing-small: tr: td Part 2: Vertical spacing table.parent-content table.v-spacing-small table.child
  14. table.parent-content: tr: td table.v-spacing-small: tr: td table.child table.v-spacing-small: tr: td

    table.child table.v-spacing-small: tr: td Part 2: Vertical spacing table.parent-content table.v-spacing-small table.child table.v-spacing-small table.child table.v-spacing-small
  15. Part 2: Vertical spacing table.v-spacing-small tr { height: 20px; }

    table.parent-content table.v-spacing-small table.child table.v-spacing-small table.child table.v-spacing-small
  16. Nope, you can’t have external stylesheets in most clients. Great!

    I can just link to a CSS file on my server.
  17. Nope, you can’t have external stylesheets in most clients. Great!

    I can just link to a CSS file on my server. Okay, how about I declare my CSS in a <style> tag at the top?
  18. Nope, you can’t have external stylesheets in most clients. Great!

    I can just link to a CSS file on my server. Sorry, Gmail doesn’t support that. And Gmail accounts for 16% of emails. Okay, how about I declare my CSS in a <style> tag at the top?
  19. Nope, you can’t have external stylesheets in most clients. Great!

    I can just link to a CSS file on my server. Sorry, Gmail doesn’t support that. And Gmail accounts for 16% of emails. Okay, how about I declare my CSS in a <style> tag at the top? Oh no.
  20. • All styles in Gmail must be done in-line. •

    This means that emails in Gmail cannot be responsive. What’s the problem?
  21. Emails that work on mobile devices work on desktops. But

    not the other way around. Let’s make emails mobile-first. Takeaway
  22. Emails that work on mobile devices work on desktops. But

    not the other way around. Let’s make emails mobile-first. Takeaway
  23. table.parent { width: 100%; max-width: 350px; margin: 0 auto; }

    @media only screen and (min- width: 600px) { table.parent { max-width: 600px !important; } } Forced Narrow Layout table.parent
  24. table.parent { width: 100%; max-width: 350px; margin: 0 auto; }

    @media only screen and (min- width: 600px) { table.parent { max-width: 600px !important; } } Forced Narrow Layout
  25. table.parent { width: 100%; max-width: 350px; margin: 0 auto; }

    @media only screen and (min- width: 600px) { table.parent { max-width: 600px !important; } } Forced Narrow Layout necessary to override in-line styles.
  26. .two-column .two-column Gmail table.two-column { width: 100%; } @media only

    screen and (min-width: 600px) { table.two-column { width: 48% !important; } } Multi-column Layout
  27. .two- column .two- column .two-column .two-column Gmail Not Gmail table.two-column

    { width: 100%; } @media only screen and (min-width: 600px) { table.two-column { width: 48% !important; } } Multi-column Layout
  28. • Outlook is one of the most restrictive clients. •

    But you can create Outlook- specific CSS to cope. Dealing with Outlook
  29. <body> <!--[if gte mso 9]> <style> // Styling goes here

    </style> <![endif]—> </body> // If greater than or equal // to Microsoft Office, Version 9
  30. • Build for just the most-used email clients. • Test

    on Litmus. • Use tables for everything. • In-line all your styling. • Make your email mobile-first. • Use conditional styling for Outlook. Takeaways