bootstrap-email 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/core/bootstrap-email.scss +18 -0
- data/core/head.scss +236 -0
- data/core/sass/_alert.scss +22 -0
- data/core/sass/_badge.scss +57 -0
- data/core/sass/_button.scss +59 -0
- data/core/sass/_card.scss +18 -0
- data/core/sass/_color.scss +23 -0
- data/core/sass/_container.scss +18 -0
- data/core/sass/_display.scss +7 -0
- data/core/sass/_functions.scss +14 -0
- data/core/sass/_grid.scss +131 -0
- data/core/sass/_hr.scss +14 -0
- data/core/sass/_image.scss +5 -0
- data/core/sass/_preview.scss +5 -0
- data/core/sass/_reboot_email.scss +63 -0
- data/core/sass/_spacing.scss +100 -0
- data/core/sass/_table.scss +137 -0
- data/core/sass/_typography.scss +41 -0
- data/core/sass/_variables.scss +107 -0
- data/core/template.html.erb +11 -0
- data/core/templates/align-center.html.erb +9 -0
- data/core/templates/align-left.html.erb +9 -0
- data/core/templates/align-right.html.erb +9 -0
- data/core/templates/body.html.erb +9 -0
- data/core/templates/col.html.erb +3 -0
- data/core/templates/container.html.erb +29 -0
- data/core/templates/div.html.erb +3 -0
- data/core/templates/hr.html.erb +9 -0
- data/core/templates/row.html.erb +7 -0
- data/core/templates/table-left.html.erb +9 -0
- data/core/templates/table.html.erb +9 -0
- data/lib/assets/stylesheets/bootstrap-email.scss +1 -0
- data/lib/bootstrap-email/action_mailer.rb +1 -2
- metadata +50 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9febce5a6fa0f69fa46c6774e7aa80df466fbe3d
|
4
|
+
data.tar.gz: 5b948f95209845ba917be984e947dfd2569ef5d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e7c5fdb5c528b169086787841c17e2813432038ea159fe1e9e77522fd63463f29335042e633de6980983530b186e3c01b9a6e786da4ed149ac53b2a0583dd30
|
7
|
+
data.tar.gz: 70e6bfe19694eaef3206900bd52b82419cb081b7ce59a55e8a2b03b13b298f8c19d8d15d82b81ee713814dd829b7e408ae7e0723680ff8255f13f43d462ebf97
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -0,0 +1,18 @@
|
|
1
|
+
@import 'sass/functions';
|
2
|
+
@import 'sass/variables';
|
3
|
+
|
4
|
+
@import 'sass/reboot_email';
|
5
|
+
@import 'sass/button';
|
6
|
+
@import 'sass/display';
|
7
|
+
@import 'sass/grid';
|
8
|
+
@import 'sass/card';
|
9
|
+
@import 'sass/container';
|
10
|
+
@import 'sass/badge';
|
11
|
+
@import 'sass/table';
|
12
|
+
@import 'sass/hr';
|
13
|
+
@import 'sass/alert';
|
14
|
+
@import 'sass/image';
|
15
|
+
@import 'sass/typography';
|
16
|
+
@import 'sass/color';
|
17
|
+
@import 'sass/preview';
|
18
|
+
@import 'sass/spacing';
|
data/core/head.scss
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
// This file will be placed in the head of the document and will not be inlined
|
2
|
+
$spacer: 16px;
|
3
|
+
$spacers: (
|
4
|
+
0: 0,
|
5
|
+
1: ($spacer * .25),
|
6
|
+
2: ($spacer * .5),
|
7
|
+
3: $spacer,
|
8
|
+
4: ($spacer * 1.5),
|
9
|
+
5: ($spacer * 3)
|
10
|
+
) !default;
|
11
|
+
|
12
|
+
$widths: (
|
13
|
+
25: 25%,
|
14
|
+
50: 50%,
|
15
|
+
75: 75%,
|
16
|
+
100: 100%,
|
17
|
+
auto: auto
|
18
|
+
) !default;
|
19
|
+
|
20
|
+
// Forces Outlook.com to display emails at full width
|
21
|
+
.ExternalClass {
|
22
|
+
width: 100%;
|
23
|
+
}
|
24
|
+
|
25
|
+
// Forces Outlook.com to display normal line spacing, here is more on that: http://www.emailonacid.com/forum/viewthread/43/
|
26
|
+
.ExternalClass,
|
27
|
+
.ExternalClass p,
|
28
|
+
.ExternalClass span,
|
29
|
+
.ExternalClass font,
|
30
|
+
.ExternalClass td,
|
31
|
+
.ExternalClass div {
|
32
|
+
line-height: 150%;
|
33
|
+
}
|
34
|
+
|
35
|
+
a {
|
36
|
+
text-decoration: none;
|
37
|
+
}
|
38
|
+
|
39
|
+
@media screen and (max-width: 600px) {
|
40
|
+
// Grid
|
41
|
+
table.row {
|
42
|
+
th.col-lg-1,
|
43
|
+
th.col-lg-2,
|
44
|
+
th.col-lg-3,
|
45
|
+
th.col-lg-4,
|
46
|
+
th.col-lg-5,
|
47
|
+
th.col-lg-6,
|
48
|
+
th.col-lg-7,
|
49
|
+
th.col-lg-8,
|
50
|
+
th.col-lg-9,
|
51
|
+
th.col-lg-10,
|
52
|
+
th.col-lg-11,
|
53
|
+
th.col-lg-12{
|
54
|
+
display: block;
|
55
|
+
width: 100% !important;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
// Display
|
60
|
+
.d-mobile {
|
61
|
+
display: block !important;
|
62
|
+
}
|
63
|
+
.d-desktop {
|
64
|
+
display: none !important;
|
65
|
+
}
|
66
|
+
|
67
|
+
// Width
|
68
|
+
@each $size, $percentage in $widths {
|
69
|
+
.w-lg-#{$size} {
|
70
|
+
width: auto !important;
|
71
|
+
& > tbody > tr > td {
|
72
|
+
width: auto !important;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
@each $size, $percentage in $widths {
|
77
|
+
.w-#{$size} {
|
78
|
+
width: $percentage !important;
|
79
|
+
& > tbody > tr > td {
|
80
|
+
width: $percentage !important;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
// Spacing
|
86
|
+
// Reset large padding to 0 on small device
|
87
|
+
@each $size, $length in $spacers {
|
88
|
+
.p-lg-#{$size} {
|
89
|
+
& > tbody > tr > td {
|
90
|
+
padding: 0 !important;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
.pt-lg-#{$size},
|
94
|
+
.py-lg-#{$size} {
|
95
|
+
& > tbody > tr > td {
|
96
|
+
padding-top: 0 !important;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
.pr-lg-#{$size},
|
100
|
+
.px-lg-#{$size} {
|
101
|
+
& > tbody > tr > td {
|
102
|
+
padding-right: 0 !important;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
.pb-lg-#{$size},
|
106
|
+
.py-lg-#{$size} {
|
107
|
+
& > tbody > tr > td {
|
108
|
+
padding-bottom: 0 !important;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
.pl-lg-#{$size},
|
112
|
+
.px-lg-#{$size} {
|
113
|
+
& > tbody > tr > td {
|
114
|
+
padding-left: 0 !important;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
// Set proper padding on small devices
|
120
|
+
@each $size, $length in $spacers {
|
121
|
+
.p-#{$size} {
|
122
|
+
& > tbody > tr > td {
|
123
|
+
padding: $length !important;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
.pt-#{$size},
|
127
|
+
.py-#{$size} {
|
128
|
+
& > tbody > tr > td {
|
129
|
+
padding-top: $length !important;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
.pr-#{$size},
|
133
|
+
.px-#{$size} {
|
134
|
+
& > tbody > tr > td {
|
135
|
+
padding-right: $length !important;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
.pb-#{$size},
|
139
|
+
.py-#{$size} {
|
140
|
+
& > tbody > tr > td {
|
141
|
+
padding-bottom: $length !important;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
.pl-#{$size},
|
145
|
+
.px-#{$size} {
|
146
|
+
& > tbody > tr > td {
|
147
|
+
padding-left: $length !important;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
// Spacers
|
153
|
+
.s-lg-1 > tbody > tr > td,
|
154
|
+
.s-lg-2 > tbody > tr > td,
|
155
|
+
.s-lg-3 > tbody > tr > td,
|
156
|
+
.s-lg-4 > tbody > tr > td,
|
157
|
+
.s-lg-5 > tbody > tr > td {
|
158
|
+
font-size: 0 !important;
|
159
|
+
line-height: 0 !important;
|
160
|
+
height: 0 !important;
|
161
|
+
}
|
162
|
+
|
163
|
+
@each $size, $length in $spacers {
|
164
|
+
.s-#{$size} > tbody > tr > td {
|
165
|
+
font-size: $length !important;
|
166
|
+
line-height: $length !important;
|
167
|
+
height: $length !important;
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
// Yahoo specific media query to revert above
|
174
|
+
@media yahoo {
|
175
|
+
// Display
|
176
|
+
.d-mobile {
|
177
|
+
display: none !important;
|
178
|
+
}
|
179
|
+
.d-desktop {
|
180
|
+
display: block !important;
|
181
|
+
}
|
182
|
+
|
183
|
+
// Width
|
184
|
+
@each $size, $percentage in $widths {
|
185
|
+
.w-lg-#{$size} {
|
186
|
+
width: $percentage !important;
|
187
|
+
& > tbody > tr > td {
|
188
|
+
width: $percentage !important;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
// Spacing
|
194
|
+
// Set proper spacing again on Yahoo
|
195
|
+
@each $size, $length in $spacers {
|
196
|
+
.p-lg-#{$size} {
|
197
|
+
& > tbody > tr > td {
|
198
|
+
padding: $length !important;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
.pt-lg-#{$size},
|
202
|
+
.py-lg-#{$size} {
|
203
|
+
& > tbody > tr > td {
|
204
|
+
padding-top: $length !important;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
.pr-lg-#{$size},
|
208
|
+
.px-lg-#{$size} {
|
209
|
+
& > tbody > tr > td {
|
210
|
+
padding-right: $length !important;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
.pb-lg-#{$size},
|
214
|
+
.py-lg-#{$size} {
|
215
|
+
& > tbody > tr > td {
|
216
|
+
padding-bottom: $length !important;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
.pl-lg-#{$size},
|
220
|
+
.px-lg-#{$size} {
|
221
|
+
& > tbody > tr > td {
|
222
|
+
padding-left: $length !important;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
// Spacing
|
228
|
+
@each $size, $length in $spacers {
|
229
|
+
.s-lg-#{$size} > tbody > tr > td {
|
230
|
+
font-size: $length !important;
|
231
|
+
line-height: $length !important;
|
232
|
+
height: $length !important;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.alert {
|
2
|
+
border-collapse: separate !important;
|
3
|
+
border: 0;
|
4
|
+
// margin-bottom: $font-size-base;
|
5
|
+
width: 100%;
|
6
|
+
& > tbody > tr > td {
|
7
|
+
padding: 0.75 * $font-size-base 1.25 * $font-size-base;
|
8
|
+
border: 1px solid transparent;
|
9
|
+
border-radius: 0.25 * $font-size-base;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
@each $color, $value in $theme-colors {
|
14
|
+
.alert-#{$color} td {
|
15
|
+
background-color: lighten($value, 40%);
|
16
|
+
border-color: lighten($value, 35%);
|
17
|
+
color: darken($value, 30%);
|
18
|
+
.hr > table > tbody > tr > td {
|
19
|
+
border-top: 1px solid lighten($value, 35%);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
.badge > tbody > tr > td {
|
2
|
+
display: inline-block;
|
3
|
+
padding: .25 * $font-size-base .4 * $font-size-base;
|
4
|
+
font-size: 75%;
|
5
|
+
font-weight: 700;
|
6
|
+
line-height: 1;
|
7
|
+
text-align: center;
|
8
|
+
white-space: nowrap;
|
9
|
+
vertical-align: baseline;
|
10
|
+
border-radius: 4px;
|
11
|
+
}
|
12
|
+
|
13
|
+
// Pill badges
|
14
|
+
.badge-pill > tbody > tr > td {
|
15
|
+
padding-right: .6 * $font-size-base;
|
16
|
+
padding-left: .6 * $font-size-base;
|
17
|
+
border-radius: 10 * $font-size-base;
|
18
|
+
}
|
19
|
+
|
20
|
+
// Colors
|
21
|
+
@each $color, $value in $theme-colors {
|
22
|
+
.badge-#{$color} > tbody > tr > td{
|
23
|
+
@include color-yiq($value);
|
24
|
+
background-color: $value;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
h1{
|
29
|
+
.badge > tbody > tr > td {
|
30
|
+
font-size: .75 * 2.25 * $font-size-base;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
h2{
|
34
|
+
.badge > tbody > tr > td {
|
35
|
+
font-size: .75 * 2 * $font-size-base;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
h3{
|
39
|
+
.badge > tbody > tr > td {
|
40
|
+
font-size: .75 * 1.75 * $font-size-base;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
h4{
|
44
|
+
.badge > tbody > tr > td {
|
45
|
+
font-size: .75 * 1.5 * $font-size-base;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
h5{
|
49
|
+
.badge > tbody > tr > td {
|
50
|
+
font-size: .75 * 1.25 * $font-size-base;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
h6{
|
54
|
+
.badge > tbody > tr > td {
|
55
|
+
font-size: .75 * $font-size-base;
|
56
|
+
}
|
57
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.btn {
|
2
|
+
border-radius: 4px;
|
3
|
+
border-collapse: separate !important;
|
4
|
+
}
|
5
|
+
|
6
|
+
.btn td {
|
7
|
+
border-radius: 4px;
|
8
|
+
text-align: center;
|
9
|
+
}
|
10
|
+
|
11
|
+
.btn td a {
|
12
|
+
font-size: 16px;
|
13
|
+
font-family: Helvetica, Arial, sans-serif;
|
14
|
+
text-decoration: none;
|
15
|
+
border-radius: 4px;
|
16
|
+
padding: 8px 12px;
|
17
|
+
line-height: 1.25 * $font-size-base;
|
18
|
+
border: 1px solid #e9703e;
|
19
|
+
display: inline-block;
|
20
|
+
font-weight: normal;
|
21
|
+
white-space: nowrap;
|
22
|
+
}
|
23
|
+
|
24
|
+
@each $color, $value in $theme-colors {
|
25
|
+
.btn-#{$color} td {
|
26
|
+
background-color: $value;
|
27
|
+
}
|
28
|
+
.btn-#{$color} td a {
|
29
|
+
background-color: $value;
|
30
|
+
@include color-yiq($value);
|
31
|
+
border-color: $value;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
@each $color, $value in $theme-colors {
|
36
|
+
.btn-outline-#{$color} td {
|
37
|
+
background-color: transparent;
|
38
|
+
border-color: $value;
|
39
|
+
}
|
40
|
+
.btn-outline-#{$color} td a {
|
41
|
+
background-color: transparent;
|
42
|
+
border-color: $value;
|
43
|
+
color: $value;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
.btn-sm td a {
|
48
|
+
font-size: .875 * $font-size-base;
|
49
|
+
padding: .25 * $font-size-base .5 * $font-size-base;
|
50
|
+
line-height: 1.5 * .875 * $font-size-base;
|
51
|
+
border-radius: .2 * $font-size-base;
|
52
|
+
}
|
53
|
+
|
54
|
+
.btn-lg td a {
|
55
|
+
font-size: 1.25 * $font-size-base;
|
56
|
+
padding: .5 * $font-size-base 1 * $font-size-base;
|
57
|
+
line-height: 1.5 * 1.25 * $font-size-base;
|
58
|
+
border-radius: .3 * $font-size-base;
|
59
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.card {
|
2
|
+
background-color: $white;
|
3
|
+
border-radius: $font-size-base * .25;
|
4
|
+
border: 1px solid $gray-300;
|
5
|
+
border-collapse: separate !important;
|
6
|
+
width: 100%;
|
7
|
+
overflow: hidden;
|
8
|
+
& > tbody > tr > td {
|
9
|
+
width: 100%;
|
10
|
+
}
|
11
|
+
.card-body {
|
12
|
+
width: 100%;
|
13
|
+
& > tbody > tr > td {
|
14
|
+
padding: $font-size-base * 1.25;
|
15
|
+
width: 100%;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
@each $color, $value in $theme-colors {
|
2
|
+
.bg-#{$color},
|
3
|
+
.bg-#{$color} > tbody > tr > td {
|
4
|
+
background-color: $value;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
|
8
|
+
@each $color, $value in $theme-colors {
|
9
|
+
.text-#{$color},
|
10
|
+
.text-#{$color} > tbody > tr > td {
|
11
|
+
color: $value;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
.text-white,
|
16
|
+
.text-white > tbody > tr > td {
|
17
|
+
color: $white;
|
18
|
+
}
|
19
|
+
|
20
|
+
.text-muted,
|
21
|
+
.text-mute > tbody > tr > td {
|
22
|
+
color: #636c72;
|
23
|
+
}
|