add richtext-content style to emails
This commit is contained in:
parent
561d8163ef
commit
db8b944e68
1 changed files with 71 additions and 34 deletions
|
@ -115,7 +115,7 @@ module Channel::EmailBuild
|
||||||
content_disposition: attachment.preferences['Content-Disposition'] || 'attachment',
|
content_disposition: attachment.preferences['Content-Disposition'] || 'attachment',
|
||||||
content_type: attachment.preferences['Content-Type'],
|
content_type: attachment.preferences['Content-Type'],
|
||||||
mime_type: attachment.preferences['Mime-Type'],
|
mime_type: attachment.preferences['Mime-Type'],
|
||||||
content: attachment.content,
|
content: attachment.content
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -153,7 +153,9 @@ Check if string is a complete html document. If not, add head and css styles.
|
||||||
#{css};
|
#{css};
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;
|
outline: none;
|
||||||
|
text-decoration: none;
|
||||||
|
-ms-interpolation-mode: bicubic;
|
||||||
}
|
}
|
||||||
a img {
|
a img {
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -162,22 +164,57 @@ Check if string is a complete html document. If not, add head and css styles.
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;
|
border-collapse: collapse;
|
||||||
|
mso-table-lspace: 0pt;
|
||||||
|
mso-table-rspace: 0pt;
|
||||||
|
border: none;
|
||||||
|
table-layout: auto;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
word-break: keep-all;
|
||||||
}
|
}
|
||||||
p, table, div, td {
|
p, table, div, td {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
p {
|
p,
|
||||||
margin: 0;
|
table,
|
||||||
|
pre,
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 16px;
|
||||||
|
}
|
||||||
|
td, th {
|
||||||
|
padding: 7px 12px;
|
||||||
|
border: 1px solid hsl(0,0%,87%);
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
tbody tr:nth-child(even) {
|
||||||
|
background: hsl(0,0%,97%);
|
||||||
|
}
|
||||||
|
col {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: none;
|
||||||
|
background: hsl(0,0%,97%);
|
||||||
|
white-space: normal;
|
||||||
}
|
}
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 2px solid blue;
|
padding: 8px 12px;
|
||||||
margin: 0px;
|
border-left: 5px solid #eee;
|
||||||
padding: 8px 12px 8px 12px;
|
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
margin: 0px;
|
padding: 12px 15px;
|
||||||
padding: 8px 12px 8px 12px;
|
font-size: 13px;
|
||||||
|
line-height: 1.45;
|
||||||
|
background: hsl(0,0%,97%);
|
||||||
|
white-space: pre-wrap;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: none;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<head>
|
<head>
|
||||||
|
|
Loading…
Reference in a new issue