Mail: gutter van 16 px rond de card (inline op de buitenste cel), zodat de paginakleur aan de zijkanten zichtbaar blijft
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -287,6 +287,15 @@ public class MailTemplateRendererTests
|
|||||||
html.Should().Contain("bgcolor=\"#f3f4f6\"").And.Contain("bgcolor=\"#ffffff\"");
|
html.Should().Contain("bgcolor=\"#f3f4f6\"").And.Contain("bgcolor=\"#ffffff\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void TheCard_HasAGutterOnNarrowScreens_InlineOnTheOuterCell_SoThePageColourShowsAtTheSides()
|
||||||
|
{
|
||||||
|
var html = _renderer.Render(MailKind.Invitation, "nl", Model()).Html;
|
||||||
|
|
||||||
|
// 16px at the sides on the cell around the card (inline: a media query is not honoured everywhere)
|
||||||
|
html.Should().Contain("<td align=\"center\" style=\"padding:24px 16px;\"><table role=\"presentation\" class=\"mail-card\"");
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void WithALogo_TheSiteNameStandsNextToIt_InTheAccentColour()
|
public void WithALogo_TheSiteNameStandsNextToIt_InTheAccentColour()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ public sealed class MailTemplateRenderer : IMailTemplateRenderer
|
|||||||
sb.Append("[data-ogsc] .mail-card{color:#f3f4f6 !important;}[data-ogsc] .mail-muted{color:#9ca3af !important;}");
|
sb.Append("[data-ogsc] .mail-card{color:#f3f4f6 !important;}[data-ogsc] .mail-muted{color:#9ca3af !important;}");
|
||||||
sb.Append("</style></head>");
|
sb.Append("</style></head>");
|
||||||
sb.Append("<body class=\"mail-page\" style=\"margin:0;padding:0;background:#f3f4f6;\">");
|
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-page\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#f3f4f6\" style=\"background:#f3f4f6;\"><tr><td align=\"center\" style=\"padding:24px 16px;\">");
|
||||||
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("<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};\">");
|
sb.Append($"<tr><td class=\"mail-accent\" style=\"padding:24px 32px;border-bottom:3px solid {colour};\">");
|
||||||
if (!string.IsNullOrEmpty(model.LogoUrl))
|
if (!string.IsNullOrEmpty(model.LogoUrl))
|
||||||
|
|||||||
Reference in New Issue
Block a user