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
@@ -0,0 +1,18 @@
|
|
1
|
+
.container {
|
2
|
+
width: 100%;
|
3
|
+
& > tbody > tr > td {
|
4
|
+
padding: 0 $font-size-base;
|
5
|
+
& > table {
|
6
|
+
width: 100%;
|
7
|
+
max-width: 600px;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
.container-fluid {
|
13
|
+
width: 100%;
|
14
|
+
& > tbody > tr > td {
|
15
|
+
padding: 0 $font-size-base;
|
16
|
+
width: 100%;
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
table.row {
|
2
|
+
margin-right: -15px;
|
3
|
+
margin-left: -15px;
|
4
|
+
table-layout: fixed;
|
5
|
+
width: 100%;
|
6
|
+
}
|
7
|
+
|
8
|
+
th.col-1,
|
9
|
+
th.col-lg-1,
|
10
|
+
th.col-2,
|
11
|
+
th.col-lg-2,
|
12
|
+
th.col-3,
|
13
|
+
th.col-lg-3,
|
14
|
+
th.col-4,
|
15
|
+
th.col-lg-4,
|
16
|
+
th.col-5,
|
17
|
+
th.col-lg-5,
|
18
|
+
th.col-6,
|
19
|
+
th.col-lg-6,
|
20
|
+
th.col-7,
|
21
|
+
th.col-lg-7,
|
22
|
+
th.col-8,
|
23
|
+
th.col-lg-8,
|
24
|
+
th.col-9,
|
25
|
+
th.col-lg-9,
|
26
|
+
th.col-10,
|
27
|
+
th.col-lg-10,
|
28
|
+
th.col-11,
|
29
|
+
th.col-lg-11,
|
30
|
+
th.col-12,
|
31
|
+
th.col-lg-12 {
|
32
|
+
min-height: 1px;
|
33
|
+
padding-right: 15px;
|
34
|
+
padding-left: 15px;
|
35
|
+
font-weight: normal;
|
36
|
+
}
|
37
|
+
|
38
|
+
table.no-gutters {
|
39
|
+
margin-right: 0;
|
40
|
+
margin-left: 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
.no-gutters > thead > tr {
|
44
|
+
& > th.col-1,
|
45
|
+
& > th.col-lg-1,
|
46
|
+
& > th.col-2,
|
47
|
+
& > th.col-lg-2,
|
48
|
+
& > th.col-3,
|
49
|
+
& > th.col-lg-3,
|
50
|
+
& > th.col-4,
|
51
|
+
& > th.col-lg-4,
|
52
|
+
& > th.col-5,
|
53
|
+
& > th.col-lg-5,
|
54
|
+
& > th.col-6,
|
55
|
+
& > th.col-lg-6,
|
56
|
+
& > th.col-7,
|
57
|
+
& > th.col-lg-7,
|
58
|
+
& > th.col-8,
|
59
|
+
& > th.col-lg-8,
|
60
|
+
& > th.col-9,
|
61
|
+
& > th.col-lg-9,
|
62
|
+
& > th.col-10,
|
63
|
+
& > th.col-lg-10,
|
64
|
+
& > th.col-11,
|
65
|
+
& > th.col-lg-11,
|
66
|
+
& > th.col-12,
|
67
|
+
& > th.col-lg-12{
|
68
|
+
padding-right: 0;
|
69
|
+
padding-left: 0;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
th.col-1,
|
74
|
+
th.col-lg-1 {
|
75
|
+
width: 8.333333%;
|
76
|
+
}
|
77
|
+
|
78
|
+
th.col-2,
|
79
|
+
th.col-lg-2 {
|
80
|
+
width: 16.666667%;
|
81
|
+
}
|
82
|
+
|
83
|
+
th.col-3,
|
84
|
+
th.col-lg-3 {
|
85
|
+
width: 25%;
|
86
|
+
}
|
87
|
+
|
88
|
+
th.col-4,
|
89
|
+
th.col-lg-4 {
|
90
|
+
width: 33.333333%;
|
91
|
+
}
|
92
|
+
|
93
|
+
th.col-5,
|
94
|
+
th.col-lg-5 {
|
95
|
+
width: 41.666667%;
|
96
|
+
}
|
97
|
+
|
98
|
+
th.col-6,
|
99
|
+
th.col-lg-6 {
|
100
|
+
width: 50%;
|
101
|
+
}
|
102
|
+
|
103
|
+
th.col-7,
|
104
|
+
th.col-lg-7 {
|
105
|
+
width: 58.333333%;
|
106
|
+
}
|
107
|
+
|
108
|
+
th.col-8,
|
109
|
+
th.col-lg-8 {
|
110
|
+
width: 66.666667%;
|
111
|
+
}
|
112
|
+
|
113
|
+
th.col-9,
|
114
|
+
th.col-lg-9 {
|
115
|
+
width: 75%;
|
116
|
+
}
|
117
|
+
|
118
|
+
th.col-10,
|
119
|
+
th.col-lg-10 {
|
120
|
+
width: 83.333333%;
|
121
|
+
}
|
122
|
+
|
123
|
+
th.col-11,
|
124
|
+
th.col-lg-11 {
|
125
|
+
width: 91.666667%;
|
126
|
+
}
|
127
|
+
|
128
|
+
th.col-12,
|
129
|
+
th.col-lg-12 {
|
130
|
+
width: 100%;
|
131
|
+
}
|
data/core/sass/_hr.scss
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
/* Based on https://templates.mailchimp.com/development/css/reset-styles/ by Mailchimp */
|
2
|
+
body, .body {
|
3
|
+
margin: 0;
|
4
|
+
Margin: 0;
|
5
|
+
padding: 0;
|
6
|
+
border: 0;
|
7
|
+
outline: 0;
|
8
|
+
width: 100%;
|
9
|
+
min-width: 100%;
|
10
|
+
height: 100%;
|
11
|
+
-webkit-text-size-adjust: 100%;
|
12
|
+
-ms-text-size-adjust: 100%;
|
13
|
+
font-family: $font-family-sans-serif;
|
14
|
+
line-height: $line-height-base * $font-size-base;
|
15
|
+
font-weight: normal;
|
16
|
+
font-size: $font-size-base;
|
17
|
+
-moz-box-sizing: border-box;
|
18
|
+
-webkit-box-sizing: border-box;
|
19
|
+
box-sizing: border-box;
|
20
|
+
}
|
21
|
+
|
22
|
+
img {
|
23
|
+
border: 0 none;
|
24
|
+
height: auto;
|
25
|
+
line-height: 100%;
|
26
|
+
outline: none;
|
27
|
+
text-decoration: none;
|
28
|
+
}
|
29
|
+
|
30
|
+
a img {
|
31
|
+
border: 0 none;
|
32
|
+
}
|
33
|
+
|
34
|
+
// don't apply to spacers
|
35
|
+
table:not([class^=s-]) {
|
36
|
+
font-family: $font-family-sans-serif;
|
37
|
+
mso-table-lspace: 0pt;
|
38
|
+
mso-table-rspace: 0pt;
|
39
|
+
}
|
40
|
+
|
41
|
+
table:not([class^=s-]) {
|
42
|
+
border-spacing: 0px;
|
43
|
+
border-collapse: collapse;
|
44
|
+
td {
|
45
|
+
border-spacing: 0px;
|
46
|
+
border-collapse: collapse;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
// to fix centering in yahoo
|
51
|
+
table[align=center] {
|
52
|
+
margin: 0 auto;
|
53
|
+
}
|
54
|
+
|
55
|
+
th,
|
56
|
+
td,
|
57
|
+
p {
|
58
|
+
text-align: left;
|
59
|
+
line-height: $line-height-base * $font-size-base;
|
60
|
+
font-size: $font-size-base;
|
61
|
+
margin: 0;
|
62
|
+
}
|
63
|
+
|
@@ -0,0 +1,100 @@
|
|
1
|
+
// Width Helper
|
2
|
+
@each $size, $percentage in $widths {
|
3
|
+
.w-#{$size} {
|
4
|
+
width: $percentage;
|
5
|
+
& > tbody > tr > td {
|
6
|
+
width: $percentage;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@each $size, $percentage in $widths {
|
12
|
+
.w-lg-#{$size} {
|
13
|
+
width: $percentage;
|
14
|
+
& > tbody > tr > td {
|
15
|
+
width: $percentage;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
// Padding Helper
|
21
|
+
@each $size, $length in $spacers {
|
22
|
+
.p-#{$size} {
|
23
|
+
& > tbody > tr > td {
|
24
|
+
padding: $length;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
.pt-#{$size},
|
28
|
+
.py-#{$size} {
|
29
|
+
& > tbody > tr > td {
|
30
|
+
padding-top: $length;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
.pr-#{$size},
|
34
|
+
.px-#{$size} {
|
35
|
+
& > tbody > tr > td {
|
36
|
+
padding-right: $length;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
.pb-#{$size},
|
40
|
+
.py-#{$size} {
|
41
|
+
& > tbody > tr > td {
|
42
|
+
padding-bottom: $length;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
.pl-#{$size},
|
46
|
+
.px-#{$size} {
|
47
|
+
& > tbody > tr > td {
|
48
|
+
padding-left: $length;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
@each $size, $length in $spacers {
|
54
|
+
.p-lg-#{$size} {
|
55
|
+
& > tbody > tr > td {
|
56
|
+
padding: $length;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
.pt-lg-#{$size},
|
60
|
+
.py-lg-#{$size} {
|
61
|
+
& > tbody > tr > td {
|
62
|
+
padding-top: $length;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
.pr-lg-#{$size},
|
66
|
+
.px-lg-#{$size} {
|
67
|
+
& > tbody > tr > td {
|
68
|
+
padding-right: $length;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
.pb-lg-#{$size},
|
72
|
+
.py-lg-#{$size} {
|
73
|
+
& > tbody > tr > td {
|
74
|
+
padding-bottom: $length;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
.pl-lg-#{$size},
|
78
|
+
.px-lg-#{$size} {
|
79
|
+
& > tbody > tr > td {
|
80
|
+
padding-left: $length;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
// Spacing Helper
|
86
|
+
@each $size, $length in $spacers {
|
87
|
+
.s-#{$size} > tbody > tr > td {
|
88
|
+
font-size: $length;
|
89
|
+
line-height: $length;
|
90
|
+
height: $length;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
@each $size, $length in $spacers {
|
95
|
+
.s-lg-#{$size} > tbody > tr > td {
|
96
|
+
font-size: $length;
|
97
|
+
line-height: $length;
|
98
|
+
height: $length;
|
99
|
+
}
|
100
|
+
}
|
@@ -0,0 +1,137 @@
|
|
1
|
+
//
|
2
|
+
// Basic Bootstrap table
|
3
|
+
//
|
4
|
+
|
5
|
+
.table {
|
6
|
+
width: 100%;
|
7
|
+
max-width: 100%;
|
8
|
+
// margin-bottom: $spacer;
|
9
|
+
background-color: $white; // Reset for nesting within parents with `background-color`.
|
10
|
+
|
11
|
+
& > thead > tr > th {
|
12
|
+
text-align: left;
|
13
|
+
}
|
14
|
+
|
15
|
+
& > thead > tr > th,
|
16
|
+
& > tbody > tr > td {
|
17
|
+
padding: 0.75 * $font-size-base;
|
18
|
+
vertical-align: top;
|
19
|
+
border-top: $table-border-width solid $table-border-color;
|
20
|
+
}
|
21
|
+
|
22
|
+
& > thead > th {
|
23
|
+
vertical-align: bottom;
|
24
|
+
border-bottom: (2 * $table-border-width) solid $table-border-color;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
.table-unstyled{
|
29
|
+
width: 100%;
|
30
|
+
max-width: 100%;
|
31
|
+
background-color: transparent;
|
32
|
+
td, th{
|
33
|
+
border-top: 0;
|
34
|
+
border-bottom: 0;
|
35
|
+
text-align: left;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
//
|
41
|
+
// Condensed table w/ half padding
|
42
|
+
//
|
43
|
+
|
44
|
+
.table-sm {
|
45
|
+
& > thead > tr > th,
|
46
|
+
& > tbody > tr > td {
|
47
|
+
padding: 0.3 * $font-size-base;;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
// Bordered version
|
53
|
+
//
|
54
|
+
// Add borders all around the table and between all the columns.
|
55
|
+
|
56
|
+
.table-bordered {
|
57
|
+
border: $table-border-width solid $table-border-color;
|
58
|
+
|
59
|
+
& > thead > tr > th,
|
60
|
+
& > tbody > tr > td {
|
61
|
+
border: $table-border-width solid $table-border-color;
|
62
|
+
}
|
63
|
+
|
64
|
+
& > thead {
|
65
|
+
& > tr > th,
|
66
|
+
& > tr > td {
|
67
|
+
border-bottom-width: (2 * $table-border-width);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
|
73
|
+
// Zebra-striping
|
74
|
+
//
|
75
|
+
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
76
|
+
|
77
|
+
.table-striped {
|
78
|
+
& > tbody > tr:nth-of-type(odd) {
|
79
|
+
background-color: #f2f2f2;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
|
84
|
+
// Table backgrounds
|
85
|
+
//
|
86
|
+
// Exact selectors below required to override `.table-striped` and prevent
|
87
|
+
// inheritance to nested tables.
|
88
|
+
|
89
|
+
@each $color, $value in $theme-colors {
|
90
|
+
.table-#{$color} {
|
91
|
+
&,
|
92
|
+
> th,
|
93
|
+
> td {
|
94
|
+
background-color: lighten($value, 40%);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
// Inverse styles
|
102
|
+
//
|
103
|
+
// Same table markup, but inverted color scheme: dark background and light text.
|
104
|
+
|
105
|
+
.thead-inverse {
|
106
|
+
& > thead > tr > th {
|
107
|
+
color: $white;
|
108
|
+
background-color: $gray-900;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
.thead-default {
|
113
|
+
& > thead > tr > th {
|
114
|
+
color: $gray-700;
|
115
|
+
background-color: $gray-200;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
.table-inverse {
|
120
|
+
color: $white;
|
121
|
+
background-color: $gray-900;
|
122
|
+
|
123
|
+
& > thead > tr > th,
|
124
|
+
& > tbody > tr > td {
|
125
|
+
border-color: #32383e;
|
126
|
+
}
|
127
|
+
|
128
|
+
&.table-bordered {
|
129
|
+
border: 0;
|
130
|
+
}
|
131
|
+
|
132
|
+
&.table-striped {
|
133
|
+
& > tbody > tr:nth-of-type(odd) {
|
134
|
+
background-color: #2c3034;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|