-
Notifications
You must be signed in to change notification settings - Fork 1
/
email-normalize.css
97 lines (79 loc) · 1.79 KB
/
email-normalize.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* Reset body
*
* Apple Mail, iOS Mail plus many more have preset margin and padding for
* the HTML <body> - this normalizes it so rendering is consistent.
*/
body {
margin: 0;
padding: 0;
}
/*
* Normalize headings
*
* Values used are browser CSS defaults.
*
* Samsung Mail: older versions reset the font-size on <h*> elements
* Mail.ru: resets font-size on <h1> & <h3>
* Outlook.com: resets margin on <h3>
*/
h1 {
margin: 0.67em 0;
font-size: 2em;
}
h2 {
margin: 0.83em 0;
font-size: 1.5em;
}
/* `html[dir] h3` increases specificity, to override Outlook.com */
h3,
html[dir] h3 {
margin: 1em 0;
font-size: 1.17em;
}
/* Center email on Android 4.4 */
div[style*="margin: 16px 0"] {
margin: 0 !important;
}
/**
* Normalize triggered links, such as dates or phone numbers,
* in Apple Mail / iOS Mail
*/
a[x-apple-data-detectors] {
color: inherit !important;
text-decoration: none !important;
font-size: inherit !important;
font-family: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
}
/* Normalize links in Gmail */
u + #body a {
color: inherit;
text-decoration: none;
font-size: inherit;
font-weight: inherit;
line-height: inherit;
}
/* Hide the download button on large images */
u ~ div img + div > div {
display: none;
}
/*
* Tables in Outlook on Windows
*
* `border-collapse` removes spaces between tables caused by border size
* `mso-table-[l/r]space` ensures no left and right space is added
* next to tables (Outlook specific CSS attributes).
*/
table {
border-collapse: collapse;
mso-table-lspace: 0;
mso-table-rspace: 0;
}
/* Fix color of links, including visited, in Outlook */
span.MsoHyperlink,
span.MsoHyperlinkFollowed {
color: inherit !important;
mso-style-priority: 99 !important;
}