zulip/templates/zerver/emails/email.css

365 lines
8.0 KiB
CSS

/* stylelint-disable color-no-hex, media-feature-range-notation */
/* Hex color codes are used instead of our standard of hsl colors,
because hex color codes are rendered by all email clients
consistently; HSL colors aren't supported by Hotmail. */
.illustration img,
img.bottom-illustration {
border: none;
-ms-interpolation-mode: bicubic;
max-width: 100%;
vertical-align: bottom;
}
body.default-email-font-settings {
font-family: sans-serif;
font-size: 14px;
line-height: 1.4;
margin: 0;
padding: 0;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
/* These .layout tables are used to create sections within the email;
see for example: https://templates.mailchimp.com/development/html/
*/
table.layout {
border-collapse: separate;
mso-table-lspace: 0;
mso-table-rspace: 0;
width: 100%;
}
table.layout > tbody > tr > td {
font-family: sans-serif;
font-size: 14px;
vertical-align: top;
}
/* After email clients strip the actual <body> tag out of the email, the
.body element will be the equivalent of our outer element. */
.body {
width: 100%;
background-color: #f5f9f8;
}
.container {
display: block;
margin: 0 auto !important;
max-width: 500px;
padding: 10px;
}
/* Our newsletters/marketing emails use a wider content width, to
support more complex content with text to the side of images. */
.container.wide-container {
max-width: 700px;
}
/* Mystery: .container contains .content, but the max-widths for this
element are 80px wider than those for .container. */
.content {
box-sizing: border-box;
display: block;
margin: 20px auto 0;
max-width: 580px;
padding: 10px;
}
.content.wide-content {
max-width: 780px;
}
/*
The main content region for the email; excludes the preheader and footer.
*/
.main {
background-color: #fff;
border-radius: 3px;
width: 100%;
}
/* Right/left padding to keep content away from edges of email client winder. */
.wrapper {
box-sizing: border-box;
padding: 0 20px 20px;
}
/* Footer section, containing unsubscribe links and the like. */
.footer {
clear: both;
padding-top: 10px;
text-align: center;
width: 100%;
margin-top: 20px;
}
/*
Apple mail and other popular email clients will convert the physical
address into a link, so we set link color on it.
*/
.footer-content-block,
.physical-address {
color: #5f5ec7;
font-size: 12px;
text-align: center;
}
.content ul,
.content ol {
/* Override excessive indentation seen in Gmail. */
padding-left: 5px;
}
.body p,
p.digest_paragraph,
.content ul,
.content ol {
font-family: sans-serif;
font-size: 14px;
font-weight: normal;
margin: 10px 0;
}
.body p li,
.content ul li,
.content ol li {
list-style-position: outside;
margin-left: 15px;
}
/* Link color styling carefully tuned to not apply to user content
inside missed-message emails. */
.body a,
.digest_paragraph a,
.sponsorship_request_link,
.support_request_link,
.email-preferences a,
.missed_message.no-content-explanation a {
color: #5f5ec7;
text-decoration: underline;
}
.body a:hover,
.digest_paragraph a:hover,
.sponsorship_request_link:hover,
.support_request_link:hover,
.email-preferences a:hover,
.missed_message.no-content-explanation a:hover {
color: #434388 !important;
}
.important {
border-bottom: 3px solid #d4e3e8;
}
.body .button {
display: block;
padding: 10px 0;
margin: 20px auto;
width: 200px;
color: #5f5ec7;
border: 2px solid #5f5ec7;
background-color: #fff;
border-radius: 4px;
font-size: 16px;
outline: none;
font-family: sans-serif;
text-decoration: none;
text-align: center;
text-shadow: none;
}
.body a.button:hover {
background-color: #5f5ec7;
color: #fff;
text-decoration: none;
}
/* The preheader is an invisible region that is used to control what
email clients display as the textual preview of the email's content
in inbox views. */
.preheader {
color: transparent;
display: none;
height: 0;
max-height: 0;
max-width: 0;
opacity: 0;
overflow: hidden;
mso-hide: all;
visibility: hidden;
width: 0;
}
/* Illustrations appear over the top of the boundary between the
blank space at the top of the email and the content box; for
that reason they need a high z-index. */
.illustration {
pointer-events: none;
cursor: default !important;
z-index: 100;
}
/* CSS for digest email content. */
.messages {
width: 600px;
font-size: 12px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow-y: auto;
}
.hot_convo_recipient_block {
border: 1px solid #000;
margin-bottom: 4px;
}
.hot_convo_recipient_header {
background-color: #9ec9ff;
border-bottom: 1px solid #000;
font-weight: bold;
padding: 2px;
}
.hot_convo_message_content {
margin-left: 1px;
margin-right: 2px;
}
.hot_convo_message_content_block {
padding-left: 6px;
font-weight: normal;
}
/* Text and link colors for missed-message emails. */
.email-preferences {
color: #666;
}
.email-preferences a {
color: #15c;
}
.missed_message {
padding-bottom: 10px;
}
.missed_message_sender {
text-decoration: underline;
font-weight: bold;
}
.content_disabled_help_link {
color: #15c;
}
/* Quoted block for text written by an organization administrator to
explain to the end user why their account got deactivated. */
.deactivated-user-text {
padding: 0 0 0 15px;
margin: 0 0 20px;
border-left: 5px solid #eee;
white-space: pre-line;
font-family: sans-serif;
font-size: 14px;
}
@media only screen and (max-width: 620px) {
table[class="body"] h1 {
font-size: 28px !important;
margin-bottom: 10px !important;
}
table[class="body"] p,
table[class="body"] ul,
table[class="body"] ol,
table[class="body"] td,
table[class="body"] span,
table[class="body"] a {
font-size: 16px !important;
}
table[class="body"] .wrapper {
padding: 0 10px 10px;
}
table[class="body"] .article {
padding: 10px !important;
}
table[class="body"] .content {
padding: 0 !important;
}
table[class="body"] .container {
padding: 0 !important;
width: 100% !important;
}
table[class="body"] .main {
border-left-width: 0 !important;
border-radius: 0 !important;
border-right-width: 0 !important;
}
table[class="body"] .btn table {
width: 100% !important;
}
table[class="body"] .btn a {
width: 100% !important;
}
table[class="body"] .img-responsive {
height: auto !important;
max-width: 100% !important;
width: auto !important;
}
}
@media all {
/* See https://templates.mailchimp.com/development/css/client-specific-styles/;
ExternalClass is something Microsoft Outlook adds to emails. */
.ExternalClass {
width: 100%;
}
.ExternalClass,
.ExternalClass p,
.ExternalClass span,
.ExternalClass font,
.ExternalClass td,
.ExternalClass div {
line-height: 100%;
}
/* iOS converts physical addresses in emails to links automatically,
so this CSS has an effect on iOS even though we don't actually
have a link inside the .physical-address element. */
.physical-address a {
color: inherit !important;
font-family: inherit !important;
font-size: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
text-decoration: none !important;
}
}
/* Mechanism for images alongside content, mainly for use in newsletters. */
.float-right-image {
float: right;
}
/* The 450px cutoff was determined by testing in Gmail as a point
where an image looks good in either state. Logically it makes senes
since then the text still has the majority of the space in the
side-by-side view. */
@media only screen and (min-width: 450px) {
.float-right-image {
max-width: 200px;
}
}