My slides for the talk about Responsive Emails on the FrontEnders Ticino monthly meetup (November 2016).
Best practice, tips, numbers, tools and ZURB Foundation for emails (Inky).
10. When do people check their email on mobile?
Movable Ink “US Consumer Device Preference Report: Q3 2014″ (2014)
11. 45%
of consumers have unsubscribed from a brand’s promotional email
because the brand’s emails or website dind’t display or work well on their smartphone
12. 34%
of consumers have marked a brand’s promotional emails as spam
because they didn’t display or work well on their smartphone
13. 79%
of people delete or unsubrscibe an email if it doesn’t look good on their mobile device
19. email development = back to the ‘90s
CSS layout as we think,
just doesn’t work
HTML Tables, and tables, and tables,...
CSS inline styles
CSS proprieties (campaignmonitor.com/css)
Picture by http://www.guestfolio.com/
34. restrict the length
… of your emails,
subscribers often skim first,
deleting any email that’s too long to easily read on mobile
35. some email development tips
● Nest tables for consistent spacing
● Use Inline CSS
● set widths in each cell rather than on the
table
● Set a Background color on a container table
● Whitespace does matter
● Avoid relying on Images
● Don’t use an image as the first item in your
email
● Use ALT attributes
● Always have texts and images
● Don’t inline CSS until you have finished to
coding
● Use email tool will automatically inline your
CSS (e.g.: ZURB Inliner or Campaign
Monitor)
● Use, if you can, a template
● Don’t use all-image emails
● Create a preview text in an hidden <div>
● CSS targeting via attribute selectors
Source: campaignmonitor.com
36. but we are on the 2016
a lot of tools could help us
37. ZURB foundationfor email
● responsive grid for any layout
● common UI patterns to build faster
● make stylish emails fast with SASS
● spend less time testing & preparing
38. SASS version
Requirements:
● Node.js
● foundation-cli
● Inky HTML
● Sass
● Handlebars templates
● BrowserSync
● Image compression
● Inlining
● Gulp
$ foundation watch (work)
$ foundation build (live)
39. inky: templating language
“Inky is a templating language that converts
simple HTML tags into the complex table HTML
required for emails.
HTML emails require tables upon tables upon
tables to work properly. Although Foundation for
Emails takes a lot of the pain out of constructing
these tables, we've made it even easier with Inky,
a templating language that converts simple
HTML tags like <row> and <columns> into
complex table HTML.”
Base tags:
● Grid:
○ <container>
○ <row>
○ <columns>
● Button: <button>
● Callout: <callout>
● Menu:
○ <menu>
○ <item>
40. inky: a templating language by ZURB Foundation
<container>
<row>
<columns>This is a column.</columns>
</row>
</container>
<table class="container">
<tbody>
<tr>
<td>
<table class="row">
<tbody>
<tr>
<th class="small-12 large-12 columns first last">
<table>
<tr>
<th>This is a column.</th>
<th class="expander"></th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
43. inky: column
<columns>
This is a column.
</columns>
<th class="small-12 large-12 columns first last">
<table>
<tr>
<th>This is a column.</th>
<th class="expander"></th>
</tr>
</table>
</th>
44. inky: row
<container>
<row>
Columns go here
</row>
</container>
<table align="center" class="container">
<tbody>
<tr>
<td>
<table class="row">
<tbody>
<tr>
Columns go here
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
45. inky: spacer
<p>Stuff on top</p>
<spacer size="100"></spacer>
<p>Stuff on bottom</p>
<p>Stuff on top</p>
<table class="spacer">
<tbody>
<tr>
<td height="100px" style="font-size:100px;line-height:100px;">
 
</td>
</tr>
</tbody>
</table>
<p>Stuff on bottom</p>