Mail: inline rand om de card en Outlook-selectors voor dark mode (media-query blijft, licht ongewijzigd)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -194,10 +194,15 @@ public sealed class MailTemplateRenderer : IMailTemplateRenderer
|
||||
sb.Append(".mail-logo-light{display:none !important;max-height:0 !important;overflow:hidden !important;mso-hide:all !important;}");
|
||||
sb.Append(".mail-logo-dark{display:block !important;max-height:none !important;overflow:visible !important;mso-hide:none !important;}");
|
||||
}
|
||||
sb.Append("}</style></head>");
|
||||
sb.Append("}");
|
||||
// Outlook.com / Outlook apps ignore the media query and mark their own dark mode with these attributes.
|
||||
sb.Append($"[data-ogsb] .mail-page{{background-color:{DarkPage} !important;}}");
|
||||
sb.Append($"[data-ogsb] .mail-card{{background-color:{DarkCard} !important;border-color:{DarkCardBorder} !important;}}");
|
||||
sb.Append("[data-ogsc] .mail-card{color:#f3f4f6 !important;}[data-ogsc] .mail-muted{color:#9ca3af !important;}");
|
||||
sb.Append("</style></head>");
|
||||
sb.Append("<body class=\"mail-page\" style=\"margin:0;padding:0;background:#f3f4f6;\">");
|
||||
sb.Append("<table role=\"presentation\" class=\"mail-page\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#f3f4f6\" style=\"background:#f3f4f6;padding:24px 0;\"><tr><td align=\"center\">");
|
||||
sb.Append("<table role=\"presentation\" class=\"mail-card\" width=\"560\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"max-width:560px;width:100%;background:#ffffff;border-radius:8px;font-family:Arial,Helvetica,sans-serif;color:#111827;\">");
|
||||
sb.Append("<table role=\"presentation\" class=\"mail-card\" width=\"560\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"max-width:560px;width:100%;background:#ffffff;border:1px solid #d1d5db;border-collapse:separate;border-radius:8px;font-family:Arial,Helvetica,sans-serif;color:#111827;\">");
|
||||
sb.Append($"<tr><td class=\"mail-accent\" style=\"padding:24px 32px;border-bottom:3px solid {colour};\">");
|
||||
if (!string.IsNullOrEmpty(model.LogoUrl))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user