Skip to content

Commit 578cb5f

Browse files
committed
fix(emails): keep card boundary robust + don't reshape custom logos
- Canvas goes to #f8f8f8 (off Andres's newsletter) so the white card reads via contrast in clients that flatten inline borders, not the border alone (Greptile P2). - Logo pins exact 70x34 only for the bundled wordmark; whitelabel brand.logoUrl now constrains by height with auto width so custom logos keep their aspect (Greptile P1).
1 parent b359446 commit 578cb5f

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

apps/sim/components/emails/_styles/base.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function buildColors() {
1313
isWhitelabeled && brand.theme?.primaryColor ? brand.theme.primaryColor : '#1a1a1a'
1414

1515
return {
16-
/** Main canvas background — platform `--bg` */
17-
bgOuter: '#fefefe',
16+
/** Main canvas background — a hair off-white so the white card reads via contrast, not the border alone */
17+
bgOuter: '#f8f8f8',
1818
/** Card/container background — platform `--surface-2` */
1919
bgCard: '#ffffff',
2020
/** Primary text — platform `--text-primary` */
@@ -39,7 +39,7 @@ function buildColors() {
3939
/** Error surface border — platform `--error-muted` */
4040
errorBorder: '#fecaca',
4141
/** Footer background — matches the canvas */
42-
footerBg: '#fefefe',
42+
footerBg: '#f8f8f8',
4343
}
4444
}
4545

apps/sim/components/emails/components/email-layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export function EmailLayout({
3030
}: EmailLayoutProps) {
3131
const brand = getBrandConfig()
3232
const baseUrl = getBaseUrl()
33+
const hasCustomLogo = Boolean(brand.logoUrl)
3334

3435
return (
3536
<Html>
@@ -42,10 +43,10 @@ export function EmailLayout({
4243
<Section style={baseStyles.header}>
4344
<Img
4445
src={brand.logoUrl || `${baseUrl}/brand/color/email/wordmark.png`}
45-
width='70'
4646
height='34'
47+
{...(hasCustomLogo ? {} : { width: '70' })}
4748
alt={brand.name}
48-
style={{ display: 'block' }}
49+
style={hasCustomLogo ? { display: 'block', width: 'auto' } : { display: 'block' }}
4950
/>
5051
</Section>
5152

0 commit comments

Comments
 (0)