Skip to content

Commit 6e40925

Browse files
authored
Merge pull request #6 from berkandirim/master
CSS refactoring
2 parents e475a9c + d87f525 commit 6e40925

File tree

4 files changed

+875
-603
lines changed

4 files changed

+875
-603
lines changed

lib/base.css

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ table {
2222
border-collapse: collapse;
2323
mso-table-lspace: 0;
2424
mso-table-rspace: 0;
25-
-ms-text-size-adjust: 100%;
26-
-webkit-text-size-adjust: 100%;
2725
}
2826

29-
h1, h2, h3, h4, h5, h6 {
27+
h1,
28+
h2,
29+
h3,
30+
h4,
31+
h5,
32+
h6 {
3033
display: block;
3134
margin: 0;
3235
padding: 0;
@@ -54,21 +57,21 @@ p {
5457
padding: 0;
5558
}
5659

57-
p, a, li, td, blockquote {
60+
p,
61+
a,
62+
li,
63+
td,
64+
blockquote {
5865
mso-line-height-rule: exactly;
5966
}
6067

61-
a[href^=tel], a[href^=sms] {
68+
a[href^=tel],
69+
a[href^=sms] {
6270
color: inherit;
6371
cursor: default;
6472
text-decoration: none;
6573
}
6674

67-
p, a, li, td, body, table, blockquote {
68-
-ms-text-size-adjust: 100%;
69-
-webkit-text-size-adjust: 100%;
70-
}
71-
7275
a[x-apple-data-detectors] {
7376
color: inherit !important;
7477
text-decoration: none !important;
@@ -101,18 +104,12 @@ a[x-apple-data-detectors] {
101104

102105
.htmplar-cell {
103106
mso-line-height-rule: exactly;
104-
-ms-text-size-adjust: 100%;
105-
-webkit-text-size-adjust: 100%;
106107
}
107108

108109
.htmplar-block {
109110
max-width: 100%;
110111
}
111112

112-
.htmplar-block-inner {
113-
114-
}
115-
116113
.htmplar-button {
117114
border-collapse: separate;
118115
}
@@ -127,14 +124,6 @@ a[x-apple-data-detectors] {
127124
padding: 0;
128125
}
129126

130-
.htmplar-button-inner {
131-
132-
}
133-
134-
.htmplar-button-content {
135-
136-
}
137-
138127
.htmplar-button-content > table {
139128
width: 100%;
140129
}
@@ -145,8 +134,6 @@ a[x-apple-data-detectors] {
145134
text-decoration: none;
146135
vertical-align: middle;
147136
mso-line-height-rule: exactly;
148-
-ms-text-size-adjust: 100%;
149-
-webkit-text-size-adjust: 100%;
150137
}
151138

152139
.htmplar-button-text {
@@ -231,7 +218,13 @@ a[x-apple-data-detectors] {
231218
}
232219

233220
@media only screen and (max-width: 30em) {
234-
body, table, td, p, a, li, blockquote {
221+
body,
222+
table,
223+
td,
224+
p,
225+
a,
226+
li,
227+
blockquote {
235228
-webkit-text-size-adjust: none !important;
236229
}
237230

lib/button.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ const Button = props => {
2424
isBlock,
2525
className,
2626
allCaps,
27-
medium
27+
medium,
28+
align
2829
} = props;
2930
const availableIn = (0, _utils.setMedium)(medium);
3031
let items = children;
@@ -58,7 +59,8 @@ const Button = props => {
5859
border: "0",
5960
cellPadding: 0,
6061
cellSpacing: 0,
61-
id: _id
62+
id: _id,
63+
align: align
6264
}, _react.default.createElement("tr", null, _react.default.createElement("td", {
6365
className: "htmplar-button-container htmplar-cell"
6466
}, _react.default.createElement("table", {
@@ -104,7 +106,8 @@ Button.propTypes = {
104106
medium: _propTypes.default.string,
105107
isBlock: _propTypes.default.bool,
106108
allCaps: _propTypes.default.bool,
107-
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array, _propTypes.default.object])
109+
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array, _propTypes.default.object]),
110+
align: _propTypes.default.string
108111
};
109112
var _default = Button;
110113
exports.default = _default;

0 commit comments

Comments
 (0)