foundation_emails 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,67 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group visibility
7
+ ////
8
+
9
+ .hide-for-large {
10
+ display: none !important;
11
+ width:0;
12
+ mso-hide:all; // hide selected elements in Outlook 2007-2013
13
+ overflow:hidden;
14
+ max-height: 0;
15
+ font-size: 0;
16
+ width: 0;
17
+ line-height: 0;
18
+
19
+ @media only screen and (max-width: #{$global-breakpoint}) {
20
+ display: block !important;
21
+ width: auto !important;
22
+ overflow: visible !important;
23
+ max-height: none !important;
24
+ font-size: inherit !important;
25
+ line-height: inherit !important;
26
+ }
27
+ }
28
+
29
+ table.body table.container .hide-for-large * {
30
+ mso-hide:all; // hide selected elements in Outlook 2007-2013
31
+ }
32
+
33
+ table.body table.container .hide-for-large,
34
+ table.body table.container .row.hide-for-large {
35
+ @media only screen and (max-width: #{$global-breakpoint}) {
36
+ display: table !important;
37
+ width: 100% !important;
38
+ }
39
+ }
40
+
41
+ table.body table.container .callout-inner.hide-for-large {
42
+ @media only screen and (max-width: #{$global-breakpoint}) {
43
+ display: table-cell !important;
44
+ width: 100% !important;
45
+ }
46
+ }
47
+
48
+ table.body table.container .show-for-large {
49
+ @media only screen and (max-width: #{$global-breakpoint}) {
50
+ display: none !important;
51
+ width:0;
52
+ mso-hide:all; // hide selected elements in Outlook 2007-2013
53
+ overflow:hidden;
54
+ }
55
+ }
56
+
57
+ // [todo] add image resets
58
+ // img {
59
+ // max-height: 0;
60
+ // width: 0;
61
+ // }
62
+ // in media query
63
+ // img {
64
+ // max-height: none !important;
65
+ // width: auto !important;
66
+ // }
67
+
@@ -0,0 +1,27 @@
1
+ // Foundation for Emails by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import
6
+ 'util/util',
7
+ 'global',
8
+ 'components/normalize',
9
+ 'grid/grid',
10
+ 'grid/block-grid',
11
+ 'components/alignment',
12
+ 'components/visibility',
13
+ 'components/typography',
14
+ 'components/button',
15
+ 'components/callout',
16
+ 'components/thumbnail',
17
+ 'components/menu',
18
+ 'components/outlook-first',
19
+ 'components/media-query';
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
@@ -0,0 +1,32 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group block-grid
7
+ ////
8
+
9
+ /// The highest number of `.x-up` classes available when using the block grid CSS.
10
+ /// @type Number
11
+ $block-grid-max: 8 !default;
12
+
13
+ /// Gutter between elements in a block grid.
14
+ /// @type Number
15
+ $block-grid-gutter: $global-gutter !default;
16
+
17
+ .block-grid {
18
+ width: 100%;
19
+ max-width: $global-width;
20
+
21
+ td {
22
+ display: inline-block;
23
+ padding: $block-grid-gutter / 2;
24
+ }
25
+ }
26
+
27
+ // Sizing classes
28
+ @for $i from 2 through $block-grid-max {
29
+ .up-#{$i} td {
30
+ width: floor(($global-width - $i * $block-grid-gutter) / $i) !important;
31
+ }
32
+ }
@@ -0,0 +1,148 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group grid
7
+ ////
8
+
9
+ /// Default number of columns for an email.
10
+ /// @type Number
11
+ $grid-column-count: 12 !default;
12
+
13
+ /// Default padding for the bottom of a column.
14
+ /// @type Number
15
+ $column-padding-bottom: $global-padding !default;
16
+
17
+ //For viewing email in browser
18
+ @media only screen {
19
+ html {
20
+ min-height: 100%;
21
+ background: $body-background;
22
+ }
23
+ }
24
+
25
+ table {
26
+ &.body {
27
+ background: $body-background;
28
+ height: 100%;
29
+ width: 100%;
30
+ }
31
+
32
+ &.container {
33
+ background: $container-background;
34
+ width: $global-width;
35
+ margin: 0 auto;
36
+ Margin: 0 auto;
37
+ text-align: inherit;
38
+ }
39
+
40
+ &.row {
41
+ padding: 0;
42
+ width: 100%;
43
+ position: relative;
44
+ }
45
+ }
46
+
47
+ table.container table.row {
48
+ display: table;
49
+ }
50
+
51
+ td.columns,
52
+ td.column,
53
+ th.columns,
54
+ th.column {
55
+ margin: 0 auto;
56
+ Margin: 0 auto;
57
+ padding-left: $global-gutter;
58
+ padding-bottom: $column-padding-bottom;
59
+ }
60
+
61
+ td.columns.last,
62
+ td.column.last,
63
+ th.columns.last,
64
+ th.column.last {
65
+ padding-right: $global-gutter;
66
+ }
67
+
68
+ //makes sure nested tables are 100% width
69
+ td.columns,
70
+ td.column,
71
+ th.columns,
72
+ th.column {
73
+ table:not(.button) {
74
+ width: 100%;
75
+ }
76
+ }
77
+
78
+ @for $i from 1 through $grid-column-count {
79
+ td.large-#{$i},
80
+ th.large-#{$i} {
81
+ width: -zf-grid-calc-px($i, $grid-column-count, $global-width);
82
+ padding-left: $global-gutter / 2;
83
+ padding-right: $global-gutter / 2;
84
+ }
85
+
86
+ td.large-#{$i}.first,
87
+ th.large-#{$i}.first {
88
+ padding-left: $global-gutter;
89
+ }
90
+
91
+ td.large-#{$i}.last,
92
+ th.large-#{$i}.last {
93
+ padding-right: $global-gutter;
94
+ }
95
+
96
+ //Collapsed logic
97
+ .collapse {
98
+ > tbody > tr > td.large-#{$i},
99
+ > tbody > tr > th.large-#{$i} {
100
+ padding-right: 0;
101
+ padding-left: 0;
102
+ width: -zf-grid-calc-px($i, $grid-column-count, $global-width) + $global-gutter;
103
+ }
104
+
105
+ //Gotta give it that extra love for the first and last columns.
106
+ td.large-#{$i}.first,
107
+ th.large-#{$i}.first,
108
+ td.large-#{$i}.last,
109
+ th.large-#{$i}.last {
110
+ width: -zf-grid-calc-px($i, $grid-column-count, $global-width) + ($global-gutter * 1.5);
111
+ }
112
+ }
113
+ }
114
+
115
+ @for $i from 1 through $grid-column-count {
116
+ td.large-#{$i} center,
117
+ th.large-#{$i} center {
118
+ min-width: -zf-grid-calc-px($i, $grid-column-count, $global-width) - ($global-gutter * 2);
119
+ }
120
+ }
121
+
122
+ @for $i from 1 through $grid-column-count {
123
+ .body .columns td.large-#{$i},
124
+ .body .column td.large-#{$i},
125
+ .body .columns th.large-#{$i},
126
+ .body .column th.large-#{$i} {
127
+ width: -zf-grid-calc-pct($i, $grid-column-count);
128
+ }
129
+ }
130
+
131
+ @for $i from 1 through ($grid-column-count - 1) {
132
+ td.large-offset-#{$i},
133
+ td.large-offset-#{$i}.first,
134
+ td.large-offset-#{$i}.last,
135
+ th.large-offset-#{$i},
136
+ th.large-offset-#{$i}.first,
137
+ th.large-offset-#{$i}.last {
138
+ //1.5 takes in effect a whole empty cell.
139
+ padding-left: -zf-grid-calc-px($i, $grid-column-count, $global-width) + $global-gutter * 2;
140
+ }
141
+ }
142
+
143
+ td.expander,
144
+ th.expander {
145
+ visibility: hidden;
146
+ width: 0;
147
+ padding: 0 !important;
148
+ }
@@ -0,0 +1,146 @@
1
+ // Foundation for Emails Settings
2
+ // ------------------------------
3
+ //
4
+ // Table of Contents:
5
+ //
6
+ // 1. Global
7
+ // 2. Grid
8
+ // 3. Block Grid
9
+ // 4. Typography
10
+ // 5. Button
11
+ // 6. Callout
12
+ // 7. Menu
13
+ // 8. Thumbnail
14
+
15
+
16
+ // 1. Global
17
+ // ---------
18
+
19
+ $primary-color: #2199e8;
20
+ $secondary-color: #777777;
21
+ $success-color: #3adb76;
22
+ $warning-color: #ffae00;
23
+ $alert-color: #ec5840;
24
+ $light-gray: #f3f3f3;
25
+ $medium-gray: #cacaca;
26
+ $dark-gray: #8a8a8a;
27
+ $black: #0a0a0a;
28
+ $white: #fefefe;
29
+ $pre-color: #ff6908;
30
+ $global-width: 580px;
31
+ $global-width-small: 95%;
32
+ $global-gutter: 16px;
33
+ $body-background: $light-gray;
34
+ $container-background: $white;
35
+ $global-padding: 16px;
36
+ $global-margin: 16px;
37
+ $global-radius: 3px;
38
+ $global-rounded: 500px;
39
+ $global-breakpoint: $global-width + $global-gutter;
40
+
41
+ // 2. Grid
42
+ // -------
43
+
44
+ $grid-column-count: 12;
45
+ $column-padding-bottom: $global-padding;
46
+
47
+ // 3. Block Grid
48
+ // -------------
49
+
50
+ $block-grid-max: 8;
51
+ $block-grid-gutter: $global-gutter;
52
+
53
+ // 4. Typography
54
+ // -------------
55
+
56
+ $global-font-color: $black;
57
+ $body-font-family: Helvetica, Arial, sans-serif;
58
+ $global-font-weight: normal;
59
+ $header-color: inherit;
60
+ $global-line-height: 1.3;
61
+ $global-font-size: 16px;
62
+ $body-line-height: $global-line-height;
63
+ $header-font-family: $body-font-family;
64
+ $header-font-weight: $global-font-weight;
65
+ $h1-font-size: 34px;
66
+ $h2-font-size: 30px;
67
+ $h3-font-size: 28px;
68
+ $h4-font-size: 24px;
69
+ $h5-font-size: 20px;
70
+ $h6-font-size: 18px;
71
+ $header-margin-bottom: 10px;
72
+ $paragraph-margin-bottom: 10px;
73
+ $small-font-size: 80%;
74
+ $small-font-color: $medium-gray;
75
+ $lead-font-size: $global-font-size * 1.25;
76
+ $lead-line-height: 1.6;
77
+ $text-padding: 10px;
78
+ $subheader-lineheight: 1.4;
79
+ $subheader-color: $dark-gray;
80
+ $subheader-font-weight: $global-font-weight;
81
+ $subheader-margin-top: 4px;
82
+ $subheader-margin-bottom: 8px;
83
+ $hr-width: $global-width;
84
+ $hr-border: 1px solid $medium-gray;
85
+ $hr-margin: 20px auto;
86
+ $anchor-text-decoration: none;
87
+ $anchor-color: $primary-color;
88
+ $anchor-color-visited: $anchor-color;
89
+ $anchor-color-hover: darken($primary-color, 10%);
90
+ $anchor-color-active: $anchor-color-hover;
91
+ $stat-font-size: 40px;
92
+
93
+ // 5. Button
94
+ // ---------
95
+
96
+ $button-padding: (
97
+ tiny: 4px 8px 4px 8px,
98
+ small: 5px 10px 5px 10px,
99
+ default: 8px 16px 8px 16px,
100
+ large: 10px 20px 10px 20px,
101
+ );
102
+ $button-font-size: (
103
+ tiny: 10px,
104
+ small: 12px,
105
+ default: 16px,
106
+ large: 20px,
107
+ );
108
+ $button-color: $white;
109
+ $button-color-alt: $medium-gray;
110
+ $button-font-weight: bold;
111
+ $button-margin: 0 0 $global-margin 0;
112
+ $button-background: $primary-color;
113
+ $button-border: 2px solid $button-background;
114
+ $button-radius: $global-radius;
115
+ $button-rounded: $global-rounded;
116
+
117
+ // 6. Callout
118
+ // ----------
119
+
120
+ $callout-background: $white;
121
+ $callout-background-fade: 85%;
122
+ $callout-padding: 10px;
123
+ $callout-margin-bottom: $global-margin;
124
+ $callout-border: 1px solid darken($callout-background, 20%);
125
+ $callout-border-secondary: 1px solid darken($secondary-color, 20%);
126
+ $callout-border-success: 1px solid darken($success-color, 20%);
127
+ $callout-border-warning: 1px solid darken($warning-color, 20%);
128
+ $callout-border-alert: 1px solid darken($alert-color, 20%);
129
+
130
+ // 7. Menu
131
+ // -------
132
+
133
+ $menu-item-padding: 10px;
134
+ $menu-item-gutter: 10px;
135
+ $menu-item-color: $primary-color;
136
+
137
+ // 8. Thumbnail
138
+ // ------------
139
+
140
+ $thumbnail-border: solid 4px $white;
141
+ $thumbnail-margin-bottom: $global-margin;
142
+ $thumbnail-shadow: 0 0 0 1px rgba($black, 0.2);
143
+ $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
144
+ $thumbnail-transition: box-shadow 200ms ease-out;
145
+ $thumbnail-radius: $global-radius;
146
+
@@ -0,0 +1,22 @@
1
+ // Foundation for Emails by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ /// Calculates a percentage value for a grid column width.
6
+ /// @access private
7
+ /// @param {number} $colNumber - Column count of the column.
8
+ /// @param {number} $totalColumns - Column count of the entire row.
9
+ /// @returns {number} A percentage width value.
10
+ @function -zf-grid-calc-pct($colNumber, $totalColumns) {
11
+ @return floor(percentage(($colNumber / $totalColumns)) * 1000000) / 1000000;
12
+ }
13
+
14
+ /// Calculates a pixel value for a grid column width.
15
+ /// @access private
16
+ /// @param {number} $columnNumber - Column count of the column.
17
+ /// @param {number} $totalColumns - Column count of the entire row.
18
+ /// @param {number} $containerWidth - Width of the surrounding container, in pixels.
19
+ /// @returns {number} A pixel width value.
20
+ @function -zf-grid-calc-px($columnNumber, $totalColumns, $containerWidth) {
21
+ @return ($containerWidth / $totalColumns * $columnNumber - $global-gutter);
22
+ }