Skip to content

Commit

Permalink
Merge pull request #6 from berkandirim/master
Browse files Browse the repository at this point in the history
CSS refactoring
  • Loading branch information
berkandirim authored May 8, 2019
2 parents e475a9c + d87f525 commit 6e40925
Show file tree
Hide file tree
Showing 4 changed files with 875 additions and 603 deletions.
47 changes: 20 additions & 27 deletions lib/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ table {
border-collapse: collapse;
mso-table-lspace: 0;
mso-table-rspace: 0;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
display: block;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -54,21 +57,21 @@ p {
padding: 0;
}

p, a, li, td, blockquote {
p,
a,
li,
td,
blockquote {
mso-line-height-rule: exactly;
}

a[href^=tel], a[href^=sms] {
a[href^=tel],
a[href^=sms] {
color: inherit;
cursor: default;
text-decoration: none;
}

p, a, li, td, body, table, blockquote {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}

a[x-apple-data-detectors] {
color: inherit !important;
text-decoration: none !important;
Expand Down Expand Up @@ -101,18 +104,12 @@ a[x-apple-data-detectors] {

.htmplar-cell {
mso-line-height-rule: exactly;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}

.htmplar-block {
max-width: 100%;
}

.htmplar-block-inner {

}

.htmplar-button {
border-collapse: separate;
}
Expand All @@ -127,14 +124,6 @@ a[x-apple-data-detectors] {
padding: 0;
}

.htmplar-button-inner {

}

.htmplar-button-content {

}

.htmplar-button-content > table {
width: 100%;
}
Expand All @@ -145,8 +134,6 @@ a[x-apple-data-detectors] {
text-decoration: none;
vertical-align: middle;
mso-line-height-rule: exactly;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}

.htmplar-button-text {
Expand Down Expand Up @@ -231,7 +218,13 @@ a[x-apple-data-detectors] {
}

@media only screen and (max-width: 30em) {
body, table, td, p, a, li, blockquote {
body,
table,
td,
p,
a,
li,
blockquote {
-webkit-text-size-adjust: none !important;
}

Expand Down
9 changes: 6 additions & 3 deletions lib/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const Button = props => {
isBlock,
className,
allCaps,
medium
medium,
align
} = props;
const availableIn = (0, _utils.setMedium)(medium);
let items = children;
Expand Down Expand Up @@ -58,7 +59,8 @@ const Button = props => {
border: "0",
cellPadding: 0,
cellSpacing: 0,
id: _id
id: _id,
align: align
}, _react.default.createElement("tr", null, _react.default.createElement("td", {
className: "htmplar-button-container htmplar-cell"
}, _react.default.createElement("table", {
Expand Down Expand Up @@ -104,7 +106,8 @@ Button.propTypes = {
medium: _propTypes.default.string,
isBlock: _propTypes.default.bool,
allCaps: _propTypes.default.bool,
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array, _propTypes.default.object])
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array, _propTypes.default.object]),
align: _propTypes.default.string
};
var _default = Button;
exports.default = _default;
Loading

0 comments on commit 6e40925

Please sign in to comment.