fix: replace hardcoded #7161FF with {{brandAccent}} in digest email template #5
Loading…
Reference in a new issue
No description provided.
Delete branch "mailship-hu5-stale-hardcoded-accent-7161ff-in-digest--a31"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mailship-hu5
Summary: Two CSS rules in
src/emails/digest.mjmlhardcoded#7161FFfor the event-item border-left and footer-link color, ignoring the{{brandAccent}}Mustache variable already used by the rest of the template. WhenBRAND_ACCENTis customized, those two elements stayed the default purple. This fix drives both from{{brandAccent}}.Changes:
src/emails/digest.mjml— replaced#7161FFwith{{brandAccent}}in.event-itemborder-left and.footer acolor (2 hunks).test/digest-template.test.js— new failing-turned-passing test with 4 assertions: verifies neither rule contains#7161FFand both reference{{brandAccent}}.How to test: Run
node test/digest-template.test.js— all 4 assertions must pass. To preview the rendered email with a custom accent, setbrandAccentinscript/render-preview.mjsand runpnpm run preview:digest.Lines 8 and 22 of digest.mjml hardcoded #7161FF for the event-item border-left and footer link color, while mailer.ts already passes brandAccent into the template (used at lines 15 and 34). When BRAND_ACCENT is customized, the border and footer links stayed the default purple. Drive both from {{brandAccent}} so they respect the customization. Fixes bead mailship-hu5