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,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9f9546b7871bd37df54d9655b8c949f96ab6bde7
4
+ data.tar.gz: 0c658572ef37dfb845c5cb6c6fa88d2282819cb3
5
+ SHA512:
6
+ metadata.gz: ddd474b1d3ab1d6b53e10cf82a4839882f46de021ae8e369fb45f78091ab7b5bad83ddb887d3e9ca1efabfff1110483ebc6286ee9e3717334b68099607ab6b64
7
+ data.tar.gz: a9fd91907b251d00041bd18b11c3b4e606b1b06800a535bc0fef31c763344bc8914190a26bd3d4f5b03c93ad0f373b78dced1a7a3558dc6c105c0c81a4a0c582
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify dependencies in foundation-emails.gemspec
4
+ gemspec
@@ -0,0 +1,9 @@
1
+ Copyright (c) 2016 ZURB, inc.
2
+
3
+ The MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,27 @@
1
+ # Foundation for Emails Gem
2
+
3
+ Foundation for Emails (previously known as Ink) is a framework for creating responsive HTML emails that work in any email client — even Outlook. Our HTML/CSS components have been tested across every major email client to ensure consistency.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'foundation_emails'
11
+ ```
12
+
13
+ Or install it yourself as:
14
+
15
+ $ gem install foundation-emails
16
+
17
+ ## Usage
18
+
19
+ To include in your assets, place the following in your desired stylesheets manifest:
20
+
21
+ ```scss
22
+ @import "foundation-emails";
23
+ ```
24
+
25
+ ## License
26
+
27
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "foundation/emails"
5
+
6
+ require "irb"
7
+ IRB.start
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "foundation_emails/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "foundation_emails"
8
+ spec.version = FoundationEmails::VERSION
9
+ spec.authors = ["ZURB"]
10
+ spec.email = ["foundation@zurb.com"]
11
+
12
+ spec.summary = %q{A framework for responsive emails made by ZURB.}
13
+ spec.description = %q{Foundation for Emails (previously known as Ink) is a framework for creating responsive HTML emails that work in any email client.}
14
+ spec.homepage = "http://foundation.zurb.com/emails"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = Dir[ File.join("**", "*") ].reject { |p| File.directory?(p) || p.match(%{^(test|spec|features)/}) }
18
+ # Include symlinked files separately
19
+ spec.files += Dir.glob("vendor/assets/stylesheets/foundation-emails/**/*.*")
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.12"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rspec", "~> 3.0"
27
+ end
@@ -0,0 +1,5 @@
1
+ require "foundation_emails/engine"
2
+
3
+ module FoundationEmails
4
+
5
+ end
@@ -0,0 +1,6 @@
1
+ require "rails"
2
+
3
+ module FoundationEmails
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module FoundationEmails
2
+ VERSION = "2.1.0"
3
+ end
@@ -0,0 +1 @@
1
+ @import "foundation-emails/foundation-emails";
@@ -0,0 +1,96 @@
1
+ // Foundation for Emails by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group global
7
+ ////
8
+
9
+ /// Primary color for interactive components like links and buttons.
10
+ /// @type Color
11
+ $primary-color: #2199e8 !default;
12
+
13
+ /// Secondary color, used with components that support the `.secondary` class.
14
+ /// @type Color
15
+ $secondary-color: #777777 !default;
16
+
17
+ /// Color to indicate a positive status or action, used with the `.success` class.
18
+ /// @type Color
19
+ $success-color: #3adb76 !default;
20
+
21
+ /// Color to indicate a caution status or action, used with the `.warning` class.
22
+ /// @type Color
23
+ $warning-color: #ffae00 !default;
24
+
25
+ /// Color to indicate a negative status or action, used with the `.alert` class.
26
+ /// @type Color
27
+ $alert-color: #ec5840 !default;
28
+
29
+ /// Color used for light gray UI items within Foundation.
30
+ /// @type Color
31
+ $light-gray: #f3f3f3 !default;
32
+
33
+ /// Color used for medium gray UI items within Foundation.
34
+ /// @type Color
35
+ $medium-gray: #cacaca !default;
36
+
37
+ /// Color used for dark gray UI items within Foundation.
38
+ /// @type Color
39
+ $dark-gray: #8a8a8a !default;
40
+
41
+ /// Color used for black ui items within Foundation
42
+ /// @type Color
43
+ $black: #0a0a0a !default;
44
+
45
+ /// Color used for white ui items within Foundation
46
+ /// @type Color
47
+ $white: #fefefe !default;
48
+
49
+ /// Color used code.
50
+ /// @type Color
51
+ $pre-color: #ff6908 !default;
52
+
53
+ /// Width of the container.
54
+ /// @type Number
55
+ $global-width: 580px !default;
56
+
57
+ /// Width of the container on small screens.
58
+ /// @type Length
59
+ $global-width-small: 95% !default;
60
+
61
+ /// Gutter for grid elements.
62
+ /// @type length
63
+ $global-gutter: 16px !default;
64
+
65
+ /// Body background color.
66
+ /// @type Length
67
+ $body-background: $light-gray !default;
68
+
69
+ /// Color for the container background
70
+ /// @type Color
71
+ $container-background: $white !default;
72
+
73
+ /// Global padding.
74
+ /// @type Number
75
+ $global-padding: 16px !default;
76
+
77
+ /// Global margin. Margin requires a capital 'M' to workin Outlook.com
78
+ /// @type Number
79
+ $global-margin: 16px !default;
80
+
81
+ /// Global raidus of radius-corners.
82
+ /// @type Number
83
+ $global-radius: 3px !default;
84
+
85
+ /// Global rounded radius of rounded-corners.
86
+ /// @type Number
87
+ $global-rounded: 500px !default;
88
+
89
+ /// Global media query to switch from desktop to mobile styles.
90
+ /// @type String
91
+ $global-breakpoint: $global-width + $global-gutter !default;
92
+
93
+
94
+ .wrapper {
95
+ width: 100%;
96
+ }
@@ -0,0 +1,97 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group alignment
7
+ ////
8
+
9
+ table.text-center,
10
+ td.text-center,
11
+ h1.text-center,
12
+ h2.text-center,
13
+ h3.text-center,
14
+ h4.text-center,
15
+ h5.text-center,
16
+ h6.text-center,
17
+ p.text-center,
18
+ span.text-center {
19
+ text-align: center;
20
+ }
21
+
22
+ h1.text-left,
23
+ h2.text-left,
24
+ h3.text-left,
25
+ h4.text-left,
26
+ h5.text-left,
27
+ h6.text-left,
28
+ p.text-left,
29
+ span.text-left {
30
+ text-align: left;
31
+ }
32
+
33
+ h1.text-right,
34
+ h2.text-right,
35
+ h3.text-right,
36
+ h4.text-right,
37
+ h5.text-right,
38
+ h6.text-right,
39
+ p.text-right,
40
+ span.text-right {
41
+ text-align: right;
42
+ }
43
+
44
+ span.text-center {
45
+ display: block;
46
+ width: 100%;
47
+ text-align: center;
48
+ }
49
+
50
+ @media only screen and (max-width: #{$global-breakpoint}) {
51
+ .small-float-center {
52
+ margin: 0 auto !important;
53
+ float: none !important;
54
+ text-align: center !important;
55
+ }
56
+
57
+ .small-text-center {
58
+ text-align: center !important;
59
+ }
60
+
61
+ .small-text-left {
62
+ text-align: left !important;
63
+ }
64
+
65
+ .small-text-right {
66
+ text-align: right !important;
67
+ }
68
+ }
69
+
70
+ img.float-left {
71
+ float: left;
72
+ text-align: left;
73
+ }
74
+
75
+ img.float-right {
76
+ float: right;
77
+ text-align: right;
78
+ }
79
+
80
+ img.float-center,
81
+ img.text-center {
82
+ margin: 0 auto;
83
+ Margin: 0 auto;
84
+ float: none;
85
+ text-align: center;
86
+ }
87
+
88
+ table.float-center,
89
+ td.float-center,
90
+ th.float-center {
91
+ margin: 0 auto;
92
+ Margin: 0 auto;
93
+ float: none;
94
+ text-align: center;
95
+ }
96
+
97
+
@@ -0,0 +1,311 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group button
7
+ ////
8
+
9
+ /// Padding inside buttons at various sizes.
10
+ /// @type Map
11
+ $button-padding: (
12
+ tiny: 4px 8px 4px 8px,
13
+ small: 5px 10px 5px 10px,
14
+ default: 8px 16px 8px 16px,
15
+ large: 10px 20px 10px 20px,
16
+ ) !default;
17
+
18
+ /// Font sizes of buttons at various sizes.
19
+ /// @type Map
20
+ $button-font-size: (
21
+ tiny: 10px,
22
+ small: 12px,
23
+ default: 16px,
24
+ large: 20px,
25
+ ) !default;
26
+
27
+ /// Text color of buttons.
28
+ /// @type Color
29
+ $button-color: $white !default;
30
+
31
+ /// Text color of buttons with a light background.
32
+ /// @type Color
33
+ $button-color-alt: $medium-gray !default;
34
+
35
+ /// Font weight of buttons.
36
+ /// @type Weight
37
+ $button-font-weight: bold !default;
38
+
39
+ /// Margin around buttons.
40
+ /// @type List
41
+ $button-margin: 0 0 $global-margin 0 !default;
42
+
43
+ /// Background color of buttons.
44
+ /// @type Color
45
+ $button-background: $primary-color !default;
46
+
47
+ /// Border around buttons.
48
+ /// @type Border
49
+ $button-border: 2px solid $button-background !default;
50
+
51
+ /// Border radius of buttons. Not supported by all email clients.
52
+ /// @type Number
53
+ $button-radius: $global-radius !default;
54
+
55
+ /// Border radius of rounded buttons. Not supported by all email clients.
56
+ /// @type Number
57
+ $button-rounded: $global-rounded !default;
58
+
59
+ table.button {
60
+ width: auto;
61
+ margin: $button-margin;
62
+ Margin: $button-margin;
63
+
64
+ table {
65
+
66
+ td {
67
+ text-align: left;
68
+ color: $button-color;
69
+ background: $button-background;
70
+ border: $button-border;
71
+
72
+ a {
73
+ font-family: $body-font-family;
74
+ font-size: map-get($button-font-size, default);
75
+ font-weight: $button-font-weight;
76
+ color: $button-color;
77
+ text-decoration: none;
78
+ display: inline-block;
79
+ padding: map-get($button-padding, default);
80
+ border: 0 solid $button-background;
81
+ border-radius: $button-radius;
82
+ }
83
+ }
84
+ }
85
+
86
+ &.radius table td {
87
+ border-radius: $button-radius;
88
+ border: none;
89
+ }
90
+
91
+ &.rounded table td {
92
+ border-radius: $button-rounded;
93
+ border: none;
94
+ }
95
+ }
96
+
97
+ table.button:hover table tr td a,
98
+ table.button:active table tr td a,
99
+ table.button table tr td a:visited,
100
+ table.button.tiny:hover table tr td a,
101
+ table.button.tiny:active table tr td a,
102
+ table.button.tiny table tr td a:visited,
103
+ table.button.small:hover table tr td a,
104
+ table.button.small:active table tr td a,
105
+ table.button.small table tr td a:visited,
106
+ table.button.large:hover table tr td a,
107
+ table.button.large:active table tr td a,
108
+ table.button.large table tr td a:visited {
109
+ color: $button-color;
110
+ }
111
+
112
+ table.button.tiny {
113
+ table {
114
+ td,
115
+ a {
116
+ padding: map-get($button-padding, tiny);
117
+ }
118
+
119
+ a {
120
+ font-size: map-get($button-font-size, tiny);
121
+ font-weight: normal;
122
+ }
123
+ }
124
+ }
125
+
126
+ table.button.small {
127
+ table {
128
+ td,
129
+ a {
130
+ padding: map-get($button-padding, small);
131
+ font-size: map-get($button-font-size, small);
132
+ }
133
+ }
134
+ }
135
+
136
+ table.button.large {
137
+ table {
138
+ a {
139
+ padding: map-get($button-padding, large);
140
+ font-size: map-get($button-font-size, large);
141
+ }
142
+ }
143
+ }
144
+
145
+ table.button.expand,
146
+ table.button.expanded {
147
+ width: 100% !important;
148
+
149
+ table {
150
+ width: 100%;
151
+
152
+ a {
153
+ text-align: center;
154
+ width: 100%;
155
+ padding-left: 0;
156
+ padding-right: 0;
157
+ }
158
+ }
159
+
160
+ center {
161
+ min-width: 0;
162
+ }
163
+ }
164
+
165
+ table.button:hover,
166
+ table.button:visited,
167
+ table.button:active {
168
+ table {
169
+ td {
170
+ background: darken($button-background, 10%);
171
+ color: $button-color;
172
+ }
173
+ }
174
+ }
175
+
176
+ table.button:hover,
177
+ table.button:visited,
178
+ table.button:active {
179
+ table {
180
+ a {
181
+ border: 0 solid darken($button-background, 10%);
182
+ }
183
+ }
184
+ }
185
+
186
+ table.button.secondary {
187
+ table {
188
+ td {
189
+ background: $secondary-color;
190
+ color: $button-color;
191
+ border: 0px solid $secondary-color;
192
+ }
193
+
194
+ a {
195
+ color: $button-color;
196
+ border: 0 solid $secondary-color;
197
+ }
198
+ }
199
+ }
200
+
201
+ table.button.secondary:hover {
202
+ table {
203
+ td {
204
+ background: lighten($secondary-color, 10%);
205
+ color: $button-color;
206
+ }
207
+
208
+ a {
209
+ border: 0 solid lighten($secondary-color, 10%);
210
+ }
211
+ }
212
+ }
213
+
214
+ table.button.secondary:hover {
215
+ table {
216
+ td a {
217
+ color: $button-color;
218
+ }
219
+ }
220
+ }
221
+
222
+ table.button.secondary:active {
223
+ table {
224
+ td a {
225
+ color: $button-color;
226
+ }
227
+ }
228
+ }
229
+
230
+ table.button.secondary {
231
+ table {
232
+ td a:visited {
233
+ color: $button-color;
234
+ }
235
+ }
236
+ }
237
+
238
+ table.button.success {
239
+ table {
240
+ td {
241
+ background: $success-color;
242
+ border: 0px solid $success-color;
243
+ }
244
+
245
+ a {
246
+ border: 0 solid $success-color;
247
+ }
248
+ }
249
+ }
250
+
251
+ table.button.success:hover {
252
+ table {
253
+ td {
254
+ background: darken($success-color, 10%);
255
+ }
256
+
257
+ a {
258
+ border: 0 solid darken($success-color, 10%);
259
+ }
260
+ }
261
+ }
262
+
263
+ table.button.alert {
264
+ table {
265
+ td {
266
+ background: $alert-color;
267
+ border: 0px solid $alert-color;
268
+ }
269
+
270
+ a {
271
+ border: 0 solid $alert-color;
272
+ }
273
+ }
274
+ }
275
+
276
+ table.button.alert:hover {
277
+ table {
278
+ td {
279
+ background: darken($alert-color, 10%);
280
+ }
281
+
282
+ a {
283
+ border: 0 solid darken($alert-color, 10%);
284
+ }
285
+ }
286
+ }
287
+
288
+ table.button.warning {
289
+ table {
290
+ td {
291
+ background: $warning-color;
292
+ border: 0px solid $warning-color;
293
+ }
294
+
295
+ a {
296
+ border: 0px solid $warning-color;
297
+ }
298
+ }
299
+ }
300
+
301
+ table.button.warning:hover {
302
+ table {
303
+ td {
304
+ background: darken($warning-color, 10%);
305
+ }
306
+
307
+ a {
308
+ border: 0px solid darken($warning-color, 10%);
309
+ }
310
+ }
311
+ }