Slide 1

Slide 1 text

Litmus Conf London, 2016/07/27

Slide 2

Slide 2 text

Rémi Parmentier @HTeuMeuLeu

Slide 3

Slide 3 text

THINKING OUTSIDE THE

Slide 4

Slide 4 text

Super Mail Forward Part I

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

What happens when you forward an email? (from a webmail)

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Not much more than when the webmail receives it in the first place.

Slide 10

Slide 10 text

.cell { color: white; background: green url(image.jpg); }

Slide 11

Slide 11 text

.cell { color: white; }

Slide 12

Slide 12 text

AOL Yahoo Outlook.com Gmail

Slide 13

Slide 13 text

AOL Yahoo Outlook.com Gmail AOL

Slide 14

Slide 14 text

! AOL Yahoo Outlook.com Gmail * [aria-labelledby="step1"], .step2, .step4 { background:grey!important; } ! @media yahoo { .step2 { background:green!important; } } ! .step1 { background:grey url('spacer.gif')!important; background:grey!important; } CSS HTML

Slide 15

Slide 15 text

! AOL Yahoo Outlook.com Gmail * [aria-labelledby="step1"], .step2, .step4 { background:grey!important; } ! @media yahoo { .step2 { background:green!important; } } ! .step1 { background:grey url('spacer.gif')!important; background:grey!important; } CSS HTML

Slide 16

Slide 16 text

! AOL Yahoo Outlook.com Gmail * [aria-labelledby="step1"], .step2, .step4 { background:grey!important; } ! @media yahoo { .step2 { background:green!important; } } ! .step1 { background:grey url('spacer.gif')!important; background:grey!important; } CSS HTML

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

AOL Yahoo Outlook.com Gmail
.aolReplacedBody * [aria-labelledby="step1"], .aolReplacedBody .step2, .aolReplacedBody .step4 { background:grey!important; } ! @media yahoo { .aolReplacedBody .step2 { background:green!important; } } ! .aolReplacedBody .step1 { background:grey url('spacer.gif')!important; background:grey!important; } CSS HTML

Slide 19

Slide 19 text

AOL Yahoo Outlook.com Gmail
.aolReplacedBody * [aria-labelledby="step1"], .aolReplacedBody .step2, .aolReplacedBody .step4 { background:grey!important; } ! @media yahoo { .aolReplacedBody .step2 { background:green!important; } } ! .aolReplacedBody .step1 { background:grey url('spacer.gif')!important; background:grey!important; } CSS HTML

Slide 20

Slide 20 text

AOL Yahoo Outlook.com Gmail
.aolReplacedBody * [aria-labelledby="step1"], .aolReplacedBody .step2, .aolReplacedBody .step4 { background:grey!important; } ! @media yahoo { .aolReplacedBody .step2 { background:green!important; } } ! .aolReplacedBody .step1 { background:grey url('spacer.gif')!important; background:grey!important; } CSS HTML

Slide 21

Slide 21 text

AOL Yahoo Outlook.com Gmail
.aolReplacedBody * [aria-labelledby="step1"], .aolReplacedBody .step2, .aolReplacedBody .step4 { background:grey!important; } ! @media yahoo { .aolReplacedBody .step2 { background:green!important; } } ! .aolReplacedBody .step1 { background:grey url(&quot;<a href="spacer.gif&quot" target=_blank>spacer.gif</a>;)!important; background:grey!important; } CSS HTML

Slide 22

Slide 22 text

AOL Yahoo Outlook.com Gmail
.aolReplacedBody * [aria-labelledby="step1"], .aolReplacedBody .step2, .aolReplacedBody .step4 { background:grey!important; } ! @media yahoo { .aolReplacedBody .step2 { background:green!important; } } CSS HTML

Slide 23

Slide 23 text

Yahoo

Slide 24

Slide 24 text

AOL Yahoo Outlook.com Gmail
.yiv113aolReplacedBody * [aria-labelledby="step1"], .yiv113aolReplacedBody .yiv113step2, .yiv113aolReplacedBody .yiv113step4 { background:grey!important; } ! @media yahoo { .yiv113aolReplacedBody .yiv113step2 { background:green!important; } } CSS HTML

Slide 25

Slide 25 text

AOL Yahoo Outlook.com Gmail
#yui_123456789 .yiv113aolReplacedBody * [aria-labelledby="step1"], #yui_123456789 .yiv113aolReplacedBody .yiv113step2, #yui_123456789 .yiv113aolReplacedBody .yiv113step4 { background:grey!important; } ! @media yahoo { #yui_123456789 .yiv113aolReplacedBody .yiv113step2 { background:green!important; } } CSS HTML

Slide 26

Slide 26 text

AOL Yahoo Outlook.com Gmail
#yui_123456789 .yiv113aolReplacedBody * [aria-labelledby="step1"], #yui_123456789 .yiv113aolReplacedBody .yiv113step2, #yui_123456789 .yiv113aolReplacedBody .yiv113step4 { background:grey!important; } ! @media yahoo { #yui_123456789 .yiv113aolReplacedBody .yiv113step2 { background:green!important; } } CSS HTML

Slide 27

Slide 27 text

AOL Yahoo Outlook.com Gmail
#yui_123456789 .yiv113aolReplacedBody * .filtered99999, #yui_123456789 .yiv113aolReplacedBody .yiv113step2, #yui_123456789 .yiv113aolReplacedBody .yiv113step4 { background:grey!important; } ! @media yahoo { #yui_123456789 .yiv113aolReplacedBody .yiv113step2 { background:green!important; } } CSS HTML

Slide 28

Slide 28 text

AOL Yahoo Outlook.com Gmail
#yui_123456789 .yiv113aolReplacedBody * .filtered99999, #yui_123456789 .yiv113aolReplacedBody .yiv113step2, #yui_123456789 .yiv113aolReplacedBody .yiv113step4 { background:grey!important; } ! @media yahoo { #yui_123456789 .yiv113aolReplacedBody .yiv113step2 { background:green!important; } } CSS HTML

Slide 29

Slide 29 text

AOL Yahoo Outlook.com Gmail
#yui_123456789 .yiv113aolReplacedBody * .filtered99999, #yui_123456789 .yiv113aolReplacedBody .yiv113step2, #yui_123456789 .yiv113aolReplacedBody .yiv113step4 { background:grey!important; } ! @media { #yui_123456789 .yiv113aolReplacedBody .yiv113step2 { background:green!important; } } CSS HTML

Slide 30

Slide 30 text

Outlook.com

Slide 31

Slide 31 text

AOL Yahoo Outlook.comGmail
.ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody * .ecxfiltered99999, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step4 { background:grey!important; } ! @media { .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2 { background:green!important; } } CSS HTML

Slide 32

Slide 32 text

AOL Yahoo Outlook.comGmail
.ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody * .ecxfiltered99999, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step4 { background:grey!important; } ! @media { .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2 { background:green!important; } } CSS HTML

Slide 33

Slide 33 text

AOL Yahoo Outlook.com Gmail
.ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody * .ecxfiltered99999, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step4 { background:grey!important; } ! @media { .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2 { background:green!important; } } CSS HTML

Slide 34

Slide 34 text

AOL Yahoo Outlook.com Gmail
.ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody * .ecxfiltered99999, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step4 { background:grey!important; } ! @media { .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2 { background:green!important; } } CSS HTML

Slide 35

Slide 35 text

AOL Yahoo Outlook.com Gmail
.ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody * .ecxfiltered99999, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step4 { background:grey!important; } ! @media { .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2 { background:green!important; } } CSS HTML

Slide 36

Slide 36 text

Gmail

Slide 37

Slide 37 text

AOL Yahoo Outlook.com Gmail
.ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody * .ecxfiltered99999, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2, .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step4 { background:grey!important; } ! @media { .ExternalClass #ecxyui_123456789 .ecxyiv113aolReplacedBody .ecxyiv113step2 { background:green!important; } } CSS HTML

Slide 38

Slide 38 text

AOL Yahoo Outlook.com Gmail
CSS HTML

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

AOL fixed their bug. The good news is…

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

Webmail security Part II

Slide 58

Slide 58 text

Slide 59

Slide 59 text

Slide 60

Slide 60 text

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Why java-script ?

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

onload ✖

Slide 69

Slide 69 text

onanimationend

Slide 70

Slide 70 text

@keyframes bar {}

Slide 71

Slide 71 text

@keyframes bar {} .foo { animation:bar; }

Slide 72

Slide 72 text

@keyframes bar {} .foo { animation:bar; }

Slide 73

Slide 73 text

@keyframes bar {} .foo { animation:bar; }

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

I reported this bug and all I got was a lousy thank you.

Slide 76

Slide 76 text

How do you filter JavaScript out of an email ? Use a white list.

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No class, no id No on mobile No media queries on mobile

Slide 79

Slide 79 text

There are two hard things in Computer Science:
 cache invalidation 
 and naming things. “ — Phil Karlton ”

Slide 80

Slide 80 text

There are three hard things in Computer Science:
 cache invalidation 
 and naming things and responsive emails. “ ”

Slide 81

Slide 81 text

It's hard to code responsive emails.

Slide 82

Slide 82 text

Source : http://webdesign.tutsplus.com/tutorials/creating-a-future-proof-responsive-email-without-media-queries--cms-23919

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

without media queries? How can we make a column grow on mobile

Slide 86

Slide 86 text

F L E X B O X

Slide 87

Slide 87 text

Source : https://emails.hteumeuleu.com/using-flexbox-in-an-email-4b1aa7a69886

Slide 88

Slide 88 text

.grid { display: flex; flex-wrap: wrap; flex-direction: row; } ! .grid > * { flex: 1 1 auto; }

Slide 89

Slide 89 text

.grid { display: flex; }

Slide 90

Slide 90 text

Source : https://emails.hteumeuleu.com/using-flexbox-in-an-email-4b1aa7a69886

Slide 91

Slide 91 text

without media queries? How can we make a column grow on mobile

Slide 92

Slide 92 text

without media queries and without flexbox? How can we make a column grow on mobile

Slide 93

Slide 93 text

Three ideas that put me on track

Slide 94

Slide 94 text

Three ideas 1. Gmail CSS support

Slide 95

Slide 95 text

.hero { background: url(image.jpg) 0 0; background-size: cover; }

Slide 96

Slide 96 text

.hero { background: url(image.jpg) 0 0 / cover; }

Slide 97

Slide 97 text

.hero { background:radial-gradient(circle at 30% 107%,#fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%); }

Slide 98

Slide 98 text

Source : http://emailweekly.co/

Slide 99

Slide 99 text

.main { width: calc(100% - 200px); }

Slide 100

Slide 100 text

200px calc(100% - 200px)

Slide 101

Slide 101 text

200px calc(100% - 200px)

Slide 102

Slide 102 text

Three ideas 2. Responsive typography

Slide 103

Slide 103 text

Source : http://madebymike.com.au/writing/precise-control-responsive-typography/

Slide 104

Slide 104 text

font-size: calc( 12px + (24 - 12) * ( (100vw - 400px) / ( 800 - 400) ));

Slide 105

Slide 105 text

Three ideas 3. « Size matters »

Slide 106

Slide 106 text

Source : http://goetter.tumblr.com/post/64119638003/quiz-parce-que-la-taille-%C3%A7a-compte

Slide 107

Slide 107 text

min-width, width and max-width Which is the strongest one ?

Slide 108

Slide 108 text

min-width: ; width: ; max-width: ; 160px 320px 480px

Slide 109

Slide 109 text

320px min-width: ; width: ; max-width: ; 160px 480px

Slide 110

Slide 110 text

480px min-width: ; width: ; max-width: ; 320px 160px

Slide 111

Slide 111 text

Source : https://www.w3.org/TR/REC-CSS2/visudet.html#min-max-widths

Slide 112

Slide 112 text

No content

Slide 113

Slide 113 text

Bingo !

Slide 114

Slide 114 text

width,! min-width,! max-width,! & calc()

Slide 115

Slide 115 text

The Fab Four Technique Part III

Slide 116

Slide 116 text

The Fab Four Technique Illustrations by Elias Stein : https://dribbble.com/shots/2012203-Paul-George

Slide 117

Slide 117 text

No content

Slide 118

Slide 118 text

There are three hard things in Computer Science:
 cache invalidation 
 and naming things and responsive emails. “ ”

Slide 119

Slide 119 text

The Fab Four Technique

Slide 120

Slide 120 text

Above 480px

Slide 121

Slide 121 text

Below 480px

Slide 122

Slide 122 text

max$width:100%;/ min$width:25%;/ width:calc((480px/$/100%)/*/480); Below breakpoint width Above breakpoint width Breakpoint

Slide 123

Slide 123 text

max$width:100%;/ min$width:25%;/ width:calc((480px/$/100%)/*/480); with a 500px parent 500px 125px 500px

Slide 124

Slide 124 text

max$width:/ min$width:/ width: with a 500px parent 500px 125px $9600px

Slide 125

Slide 125 text

max$width:/ min$width:/ width: avec un parent à 500px 500px $9600px 125px

Slide 126

Slide 126 text

max$width:100%;/ min$width:25%;/ width:calc((480px/$/100%)/*/480); with a 400px parent 400px 100px 400px

Slide 127

Slide 127 text

max$width:100%;/ min$width:25%;/ width:calc( with a 400px parent 400px 100px 38400px

Slide 128

Slide 128 text

max$width:100%;/ min$width:25%;/ width:calc( avec un parent à 400px 200px 38400px 400px

Slide 129

Slide 129 text

max$width:100%;/ min$width:25%;/ width:calc((480px/$/100%)/*/480);

Slide 130

Slide 130 text

max$width:50%;/ min$width:25%;/ width:calc((480px/$/100%)/*/480);

Slide 131

Slide 131 text

No content

Slide 132

Slide 132 text

Support Apple Mail Gmail Outlook.com
 (2015) Thunderbird Orange AOL

Slide 133

Slide 133 text

Support for Outlook.com (2015 version

Slide 134

Slide 134 text

No content

Slide 135

Slide 135 text

width:calc((480px/$/100%)/*/480);

Slide 136

Slide 136 text

width:calc(480px/*/480/$/100%/*/480);

Slide 137

Slide 137 text

Support for 
 older WebKit Safari 6 and less Android 4 and less

Slide 138

Slide 138 text

max$width:100%;/ min$width:25%;/ width:calc(480px/*/480/$/100%/*/480);

Slide 139

Slide 139 text

max$width:100%;/ min$width:25%;/ width:$webkit$calc(480px/*/480/$/100%/*/480);/ width:calc(480px/*/480/$/100%/*/480);

Slide 140

Slide 140 text

Graceful degradation
 without calc()

Slide 141

Slide 141 text

display:inline$block;/ min$width:120px;/ width:25%;

Slide 142

Slide 142 text

max$width:100%;/ min$width:25%;/ width:$webkit$calc(480px/*/480/$/100%/*/480);/ width:calc(480px/*/480/$/100%/*/480); display:inline$block;/ min$width:120px;/ width:25%;

Slide 143

Slide 143 text

max$width:100%;/ min$width:$webkit$calc(25%);/ min$width:calc(25%);/ width:$webkit$calc(480px/*/480/$/100%/*/480);/ width:calc(480px/*/480/$/100%/*/480); display:inline$block;/ min$width:120px;/ width:25%;

Slide 144

Slide 144 text

Support for Outlook.com (2016 version

Slide 145

Slide 145 text

No content

Slide 146

Slide 146 text

/ / …/

Slide 147

Slide 147 text

/ / …/

Slide 148

Slide 148 text

width:calc(480px/*/480/$/100%/*/480);

Slide 149

Slide 149 text

width:calc(230400px/$/48000%);

Slide 150

Slide 150 text

/ / …/

Slide 151

Slide 151 text

/ / …/

Slide 152

Slide 152 text

Constraints drive creativity.

Slide 153

Slide 153 text

Thank you ! @HTeuMeuLeu emails.hteumeuleu.com tilt-studio.fr