foundation_emails 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.md +9 -0
  4. data/README.md +27 -0
  5. data/Rakefile +6 -0
  6. data/bin/console +7 -0
  7. data/bin/setup +6 -0
  8. data/foundation-emails.gemspec +27 -0
  9. data/lib/foundation_emails.rb +5 -0
  10. data/lib/foundation_emails/engine.rb +6 -0
  11. data/lib/foundation_emails/version.rb +3 -0
  12. data/vendor/assets/stylesheets/_foundation-emails.scss +1 -0
  13. data/vendor/assets/stylesheets/foundation-emails/_global.scss +96 -0
  14. data/vendor/assets/stylesheets/foundation-emails/components/_alignment.scss +97 -0
  15. data/vendor/assets/stylesheets/foundation-emails/components/_button.scss +311 -0
  16. data/vendor/assets/stylesheets/foundation-emails/components/_callout.scss +85 -0
  17. data/vendor/assets/stylesheets/foundation-emails/components/_media-query.scss +117 -0
  18. data/vendor/assets/stylesheets/foundation-emails/components/_menu.scss +68 -0
  19. data/vendor/assets/stylesheets/foundation-emails/components/_normalize.scss +90 -0
  20. data/vendor/assets/stylesheets/foundation-emails/components/_outlook-first.scss +11 -0
  21. data/vendor/assets/stylesheets/foundation-emails/components/_thumbnail.scss +49 -0
  22. data/vendor/assets/stylesheets/foundation-emails/components/_typography.scss +324 -0
  23. data/vendor/assets/stylesheets/foundation-emails/components/_visibility.scss +67 -0
  24. data/vendor/assets/stylesheets/foundation-emails/foundation-emails.scss +27 -0
  25. data/vendor/assets/stylesheets/foundation-emails/grid/_block-grid.scss +32 -0
  26. data/vendor/assets/stylesheets/foundation-emails/grid/_grid.scss +148 -0
  27. data/vendor/assets/stylesheets/foundation-emails/settings/_settings.scss +146 -0
  28. data/vendor/assets/stylesheets/foundation-emails/util/_util.scss +22 -0
  29. metadata +115 -0
@@ -0,0 +1,85 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group callout
7
+ ////
8
+
9
+ /// Background color of a callout.
10
+ /// @type Color
11
+ $callout-background: $white !default;
12
+
13
+ /// Fade value for callout backgrounds.
14
+ /// @type Number
15
+ $callout-background-fade: 85% !default;
16
+
17
+ /// Padding inside a callout.
18
+ /// @type Length
19
+ $callout-padding: 10px !default;
20
+
21
+ /// Bottom margin of a callout.
22
+ /// @type Length
23
+ $callout-margin-bottom: $global-margin !default;
24
+
25
+ /// Border around a callout.
26
+ /// @type Border
27
+ $callout-border: 1px solid darken($callout-background, 20%) !default;
28
+
29
+ /// Border around a callout with the `.success` class.
30
+ /// @type Border
31
+ $callout-border-secondary: 1px solid darken($secondary-color, 20%) !default;
32
+
33
+ /// Border around a callout with the `.success` class.
34
+ /// @type Border
35
+ $callout-border-success: 1px solid darken($success-color, 20%) !default;
36
+
37
+ /// Border around a callout with the `.warning` class.
38
+ /// @type Border
39
+ $callout-border-warning: 1px solid darken($warning-color, 20%) !default;
40
+
41
+ /// Border around a callout with the `.alert` class.
42
+ /// @type Border
43
+ $callout-border-alert: 1px solid darken($alert-color, 20%) !default;
44
+
45
+ table.callout {
46
+ margin-bottom: $callout-margin-bottom;
47
+ Margin-bottom: $callout-margin-bottom;
48
+ }
49
+
50
+ th.callout-inner {
51
+ width: 100%;
52
+ border: $callout-border;
53
+ padding: $callout-padding;
54
+ background: $callout-background;
55
+
56
+ &.primary {
57
+ background: scale-color($primary-color, $lightness: $callout-background-fade);
58
+ border: $callout-border-secondary;
59
+ color: $black;
60
+ }
61
+
62
+ &.secondary {
63
+ background: scale-color($secondary-color, $lightness: $callout-background-fade);
64
+ border: $callout-border-secondary;
65
+ color: $black;
66
+ }
67
+
68
+ &.success {
69
+ background: scale-color($success-color, $lightness: $callout-background-fade);
70
+ border: $callout-border-success;
71
+ color: $white;
72
+ }
73
+
74
+ &.warning {
75
+ background: scale-color($warning-color, $lightness: $callout-background-fade);
76
+ border: $callout-border-warning;
77
+ color: $white;
78
+ }
79
+
80
+ &.alert {
81
+ background: scale-color($alert-color, $lightness: $callout-background-fade);
82
+ border: $callout-border-alert;
83
+ color: $white;
84
+ }
85
+ }
@@ -0,0 +1,117 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group media-query
7
+ ////
8
+
9
+ @media only screen and (max-width: #{$global-breakpoint}) {
10
+ table.body img {
11
+ width: auto !important;
12
+ height: auto !important;
13
+ }
14
+
15
+ table.body center {
16
+ min-width: 0 !important;
17
+ }
18
+
19
+ table.body .container {
20
+ width: $global-width-small !important;
21
+ }
22
+
23
+ //If it supports border-box, why not? Am I right?
24
+ //Also, by default pad that to the global-gutter variable
25
+ table.body .columns,
26
+ table.body .column {
27
+ height: auto !important;
28
+ -moz-box-sizing: border-box;
29
+ -webkit-box-sizing: border-box;
30
+ box-sizing: border-box;
31
+ padding-left: $global-gutter !important;
32
+ padding-right: $global-gutter !important;
33
+
34
+ // Nested columns won't double the padding
35
+ .column,
36
+ .columns {
37
+ padding-left: 0 !important;
38
+ padding-right: 0 !important;
39
+ }
40
+ }
41
+
42
+ // Collpased columns have no gutter.
43
+ .collapse {
44
+ table.body & .columns,
45
+ table.body & .column {
46
+ padding-left: 0 !important;
47
+ padding-right: 0 !important;
48
+ }
49
+ }
50
+
51
+ // Basic grid rules
52
+ @for $i from 1 through $grid-column-count {
53
+ td.small-#{$i},
54
+ th.small-#{$i} {
55
+ display: inline-block !important;
56
+ width: -zf-grid-calc-pct($i, $grid-column-count) !important;
57
+ }
58
+ }
59
+
60
+ //If it's the last column in column count (12 by default),
61
+ //give it block and 100% width to knock down the wimpy columns to their own row.
62
+ .columns td.small-#{$grid-column-count},
63
+ .column td.small-#{$grid-column-count},
64
+ .columns th.small-#{$grid-column-count},
65
+ .column th.small-#{$grid-column-count} {
66
+ display: block !important;
67
+ width: 100% !important;
68
+ }
69
+
70
+ @for $i from 1 through ($grid-column-count - 1) {
71
+ table.body td.small-offset-#{$i},
72
+ table.body th.small-offset-#{$i} {
73
+ //1.5 takes in effect a whole empty cell.
74
+ margin-left: -zf-grid-calc-pct($i, $grid-column-count) !important;
75
+ Margin-left: -zf-grid-calc-pct($i, $grid-column-count) !important;
76
+ }
77
+ }
78
+
79
+ table.body table.columns td.expander,
80
+ table.body table.columns th.expander {
81
+ display: none !important;
82
+ }
83
+
84
+ table.body .right-text-pad,
85
+ table.body .text-pad-right {
86
+ padding-left: $text-padding !important;
87
+ }
88
+
89
+ table.body .left-text-pad,
90
+ table.body .text-pad-left {
91
+ padding-right: $text-padding !important;
92
+ }
93
+
94
+ //menu
95
+ table.menu {
96
+ width: 100% !important;
97
+
98
+ td,
99
+ th {
100
+ width: auto !important;
101
+ display: inline-block !important;
102
+ }
103
+
104
+ &.vertical, &.small-vertical {
105
+ td,
106
+ th {
107
+ display: block !important;
108
+ }
109
+ }
110
+ }
111
+
112
+ // Centers the menus!
113
+ table.menu[align="center"] {
114
+ width: auto !important;
115
+ }
116
+ }
117
+
@@ -0,0 +1,68 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group menu
7
+ ////
8
+
9
+ /// Padding inside a menu item.
10
+ /// @type Length
11
+ $menu-item-padding: 10px !default;
12
+
13
+ /// Right-hand spacing of items in menus with the `.simple` class.
14
+ /// @type Length
15
+ $menu-item-gutter: 10px !default;
16
+
17
+ /// This is the color of the menu item links.
18
+ /// @type Color
19
+ $menu-item-color: $primary-color !default;
20
+
21
+
22
+ table.menu {
23
+ width: $global-width;
24
+
25
+ td.menu-item,
26
+ th.menu-item{
27
+ padding: $menu-item-padding;
28
+ padding-right: $menu-item-gutter;
29
+
30
+ a {
31
+ color: $menu-item-color;
32
+ }
33
+ }
34
+ }
35
+
36
+ // Doesn't work on the pesky ESPs like outlook 2000
37
+ table.menu.vertical {
38
+ td.menu-item,
39
+ th.menu-item {
40
+ padding: $menu-item-padding;
41
+ padding-right: 0;
42
+ display: block;
43
+
44
+ a {
45
+ width: 100%;
46
+ }
47
+ }
48
+
49
+ // Nested lists need some more padding to the left
50
+ td.menu-item,
51
+ th.menu-item {
52
+ table.menu.vertical {
53
+ td.menu-item,
54
+ th.menu-item {
55
+ padding-left: $menu-item-padding;
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ table.menu.text-center a {
62
+ text-align: center;
63
+ }
64
+
65
+ //Centers the menus!
66
+ .menu[align="center"] {
67
+ width: auto !important;
68
+ }
@@ -0,0 +1,90 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group normalize
7
+ ////
8
+
9
+ $paragraph-margin-bottom: 10px !default;
10
+
11
+ #outlook a {
12
+ padding: 0;
13
+ }
14
+
15
+ body {
16
+ width: 100% !important;
17
+ min-width: 100%;
18
+ -webkit-text-size-adjust: 100%;
19
+ -ms-text-size-adjust: 100%;
20
+ margin: 0;
21
+ Margin: 0;
22
+ padding: 0;
23
+ -moz-box-sizing: border-box;
24
+ -webkit-box-sizing: border-box;
25
+ box-sizing: border-box;
26
+ }
27
+
28
+ .ExternalClass {
29
+ width: 100%;
30
+
31
+ &,
32
+ p,
33
+ span,
34
+ font,
35
+ td,
36
+ div {
37
+ line-height: 100%;
38
+ }
39
+ }
40
+
41
+ #backgroundTable {
42
+ margin: 0;
43
+ Margin: 0;
44
+ padding: 0;
45
+ width: 100% !important;
46
+ line-height: 100% !important;
47
+ }
48
+
49
+ img {
50
+ outline: none;
51
+ text-decoration: none;
52
+ -ms-interpolation-mode: bicubic;
53
+ width: auto;
54
+ max-width: 100%;
55
+ clear: both;
56
+ display: block;
57
+ }
58
+
59
+ center {
60
+ width: 100%;
61
+ min-width: $global-width;
62
+ }
63
+
64
+ a img {
65
+ border: none;
66
+ }
67
+
68
+ p {
69
+ margin: 0 0 0 $paragraph-margin-bottom;
70
+ Margin: 0 0 0 $paragraph-margin-bottom;
71
+ }
72
+
73
+ table {
74
+ border-spacing: 0;
75
+ border-collapse: collapse;
76
+ }
77
+
78
+ td {
79
+ word-wrap: break-word;
80
+ -webkit-hyphens: auto;
81
+ -moz-hyphens: auto;
82
+ hyphens: auto;
83
+ border-collapse: collapse !important;
84
+ }
85
+
86
+ table, tr, td {
87
+ padding: 0;
88
+ vertical-align: top;
89
+ text-align: left;
90
+ }
@@ -0,0 +1,11 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group outlook
7
+ ////
8
+
9
+ body.outlook p {
10
+ display: inline !important;
11
+ }
@@ -0,0 +1,49 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group thumbnail
7
+ ////
8
+
9
+ /// Border around thumbnail images.
10
+ /// @type Border
11
+ $thumbnail-border: solid 4px $white !default;
12
+
13
+ /// Bottom margin for thumbnail images.
14
+ /// @type Length
15
+ $thumbnail-margin-bottom: $global-margin !default;
16
+
17
+ /// Box shadow under thumbnail images.
18
+ /// @type Shadow
19
+ $thumbnail-shadow: 0 0 0 1px rgba($black, 0.2) !default;
20
+
21
+ /// Box shadow under thumbnail images.
22
+ /// @type Shadow
23
+ $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5) !default;
24
+
25
+ /// Transition proprties for thumbnail images.
26
+ /// @type Transition
27
+ $thumbnail-transition: box-shadow 200ms ease-out !default;
28
+
29
+ /// Default radius for thumbnail images.
30
+ /// @type Number
31
+ $thumbnail-radius: $global-radius !default;
32
+
33
+ /// Adds thumbnail styles to an element.
34
+ .thumbnail {
35
+ border: $thumbnail-border;
36
+ box-shadow: $thumbnail-shadow;
37
+ display: inline-block;
38
+ line-height: 0;
39
+ max-width: 100%;
40
+ transition: $thumbnail-transition;
41
+ border-radius: $thumbnail-radius;
42
+ margin-bottom: $thumbnail-margin-bottom;
43
+
44
+ &:hover,
45
+ &:focus {
46
+ box-shadow: $thumbnail-shadow-hover;
47
+ }
48
+ }
49
+
@@ -0,0 +1,324 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group typography
7
+ ////
8
+
9
+ /// Global font color.
10
+ /// @type Color
11
+ $global-font-color: $black !default;
12
+
13
+ /// Global font family.
14
+ /// @type Font
15
+ $body-font-family: Helvetica, Arial, sans-serif !default;
16
+
17
+ /// Global font weight.
18
+ /// @type Keyword
19
+ $global-font-weight: normal !default;
20
+
21
+ /// Global font weight.
22
+ /// @type Keyword
23
+ $header-color: inherit !default;
24
+
25
+ /// Global line height.
26
+ /// @type Number
27
+ $global-line-height: 1.3 !default;
28
+
29
+ /// Font size of body text.
30
+ /// @type Number
31
+ $global-font-size: 16px !default;
32
+
33
+ /// Line height of body text.
34
+ /// @type Number
35
+ $body-line-height: $global-line-height !default;
36
+
37
+ /// Font family of headings.
38
+ /// @type List
39
+ $header-font-family: $body-font-family !default;
40
+
41
+ /// Font family of headings.
42
+ /// @type List
43
+ $header-font-weight: $global-font-weight !default;
44
+
45
+ /// Font size of `<h1>` elements.
46
+ /// @type Number
47
+ $h1-font-size: 34px !default;
48
+
49
+ /// Font size of `<h2>` elements.
50
+ /// @type Number
51
+ $h2-font-size: 30px !default;
52
+
53
+ /// Font size of `<h3>` elements.
54
+ /// @type Number
55
+ $h3-font-size: 28px !default;
56
+
57
+ /// Font size of `<h4>` elements.
58
+ /// @type Number
59
+ $h4-font-size: 24px !default;
60
+
61
+ /// Font size of `<h5>` elements.
62
+ /// @type Number
63
+ $h5-font-size: 20px !default;
64
+
65
+ /// Font size of `<h6>` elements.
66
+ /// @type Number
67
+ $h6-font-size: 18px !default;
68
+
69
+ /// Margin bottom of `<h1>` through `<h6>` elements.
70
+ /// @type Number
71
+ $header-margin-bottom: 10px !default;
72
+
73
+ /// Margin bottom of paragraphs.
74
+ /// @type Number
75
+ $paragraph-margin-bottom: 10px !default;
76
+
77
+ /// Default font size for `<small>`.
78
+ /// @type Number
79
+ $small-font-size: 80% !default;
80
+
81
+ /// Color of `<small>` elements when placed inside headers.
82
+ /// @type Color
83
+ $small-font-color: $medium-gray !default;
84
+
85
+ /// Font size of lead paragraphs.
86
+ /// @type Number
87
+ $lead-font-size: $global-font-size * 1.25 !default;
88
+
89
+ /// Line height of lead paragraphs.
90
+ /// @type Number
91
+ $lead-line-height: 1.6 !default;
92
+
93
+ /// Padding inside paragraphs.
94
+ /// @type Number
95
+ $text-padding: 10px !default;
96
+
97
+ /// Default line height for subheaders.
98
+ /// @type Number
99
+ $subheader-lineheight: 1.4 !default;
100
+
101
+ /// Default font color for subheaders.
102
+ /// @type Color
103
+ $subheader-color: $dark-gray !default;
104
+
105
+ /// Default font weight for subheaders.
106
+ /// @type String
107
+ $subheader-font-weight: $global-font-weight !default;
108
+
109
+ /// Default top margin for subhheaders.
110
+ /// @type Number
111
+ $subheader-margin-top: 4px !default;
112
+
113
+ /// Default bottom margin for subheaders.
114
+ /// @type Number
115
+ $subheader-margin-bottom: 8px !default;
116
+
117
+ /// Maximum width of a divider.
118
+ /// @type Number
119
+ $hr-width: $global-width !default;
120
+
121
+ /// Default border for a divider.
122
+ /// @type List
123
+ $hr-border: 1px solid $medium-gray !default;
124
+
125
+ /// Default margin for a divider.
126
+ /// @type Number | List
127
+ $hr-margin: 20px auto !default;
128
+
129
+ /// Text decoration for anchors.
130
+ /// @type Keyword
131
+ $anchor-text-decoration: none !default;
132
+
133
+ /// Text color of anchors.
134
+ /// @type Color
135
+ $anchor-color: $primary-color !default;
136
+
137
+ /// Text color of anchors to visited links.
138
+ /// @type Color
139
+ $anchor-color-visited: $anchor-color !default;
140
+
141
+ /// Text color of anchors on hover.
142
+ /// @type Color
143
+ $anchor-color-hover: darken($primary-color, 10%) !default;
144
+
145
+ /// Text color of active anchors.
146
+ /// @type Color
147
+ $anchor-color-active: $anchor-color-hover !default;
148
+
149
+ /// Default font size for statistic numbers.
150
+ /// @type Number
151
+ $stat-font-size: 40px !default;
152
+
153
+ body,
154
+ table.body,
155
+ h1,
156
+ h2,
157
+ h3,
158
+ h4,
159
+ h5,
160
+ h6,
161
+ p,
162
+ td,
163
+ th,
164
+ a {
165
+ color: $global-font-color;
166
+ font-family: $body-font-family;
167
+ font-weight: $global-font-weight;
168
+ padding: 0;
169
+ margin: 0;
170
+ Margin: 0;
171
+ text-align: left;
172
+ line-height: $global-line-height;
173
+ }
174
+
175
+ h1,
176
+ h2,
177
+ h3,
178
+ h4,
179
+ h5,
180
+ h6 {
181
+ color: $header-color;
182
+ word-wrap: normal;
183
+ font-family: $header-font-family;
184
+ font-weight: $header-font-weight;
185
+ margin-bottom: $header-margin-bottom;
186
+ Margin-bottom: $header-margin-bottom;
187
+ }
188
+
189
+ h1 {
190
+ font-size: $h1-font-size;
191
+ }
192
+
193
+ h2 {
194
+ font-size: $h2-font-size;
195
+ }
196
+
197
+ h3 {
198
+ font-size: $h3-font-size;
199
+ }
200
+
201
+ h4 {
202
+ font-size: $h4-font-size;
203
+ }
204
+
205
+ h5 {
206
+ font-size: $h5-font-size;
207
+ }
208
+
209
+ h6 {
210
+ font-size: $h6-font-size;
211
+ }
212
+
213
+ body,
214
+ table.body,
215
+ p,
216
+ td,
217
+ th {
218
+ font-size: $global-font-size;
219
+ line-height: $body-line-height;
220
+ }
221
+
222
+ p {
223
+ margin-bottom: $paragraph-margin-bottom;
224
+ Margin-bottom: $paragraph-margin-bottom;
225
+
226
+ &.lead {
227
+ font-size: $lead-font-size;
228
+ line-height: $lead-line-height;
229
+ }
230
+
231
+ &.subheader {
232
+ margin-top: $subheader-margin-top;
233
+ margin-bottom: $subheader-margin-bottom;
234
+ Margin-top: $subheader-margin-top;
235
+ Margin-bottom: $subheader-margin-bottom;
236
+ font-weight: $subheader-font-weight;
237
+ line-height: $subheader-lineheight;
238
+ color: $subheader-color;
239
+ }
240
+ }
241
+
242
+ small {
243
+ font-size: $small-font-size;
244
+ color: $small-font-color;
245
+ }
246
+
247
+ a {
248
+ color: $anchor-color;
249
+ text-decoration: $anchor-text-decoration;
250
+
251
+ &:hover {
252
+ color: $anchor-color-hover;
253
+ }
254
+
255
+ &:active {
256
+ color: $anchor-color-active;
257
+ }
258
+
259
+ &:visited {
260
+ color: $anchor-color-visited;
261
+ }
262
+ }
263
+
264
+ h1 a,
265
+ h1 a:visited,
266
+ h2 a,
267
+ h2 a:visited,
268
+ h3 a,
269
+ h3 a:visited,
270
+ h4 a,
271
+ h4 a:visited,
272
+ h5 a,
273
+ h5 a:visited,
274
+ h6 a,
275
+ h6 a:visited {
276
+ color: $anchor-color;
277
+ }
278
+
279
+ pre {
280
+ background: $light-gray;
281
+ margin: 30px 0;
282
+ Margin: 30px 0;
283
+
284
+ code {
285
+ color: $medium-gray;
286
+
287
+ span.callout {
288
+ color: $dark-gray;
289
+ font-weight: bold;
290
+ }
291
+
292
+ span.callout-strong {
293
+ color: $pre-color;
294
+ font-weight: bold;
295
+ }
296
+ }
297
+ }
298
+
299
+ // Horizontal rule
300
+
301
+ hr {
302
+ max-width: $hr-width;
303
+ height: 0;
304
+ border-right: 0;
305
+ border-top: 0;
306
+ border-bottom: $hr-border;
307
+ border-left: 0;
308
+ margin: $hr-margin;
309
+ Margin: $hr-margin;
310
+ clear: both;
311
+ }
312
+
313
+ // Use to style a large number to display a statistic
314
+ .stat {
315
+ font-size: $stat-font-size;
316
+ line-height: 1;
317
+
318
+ p + & {
319
+ margin-top: -16px;
320
+ Margin-top: -16px;
321
+ }
322
+ }
323
+
324
+