Skip to content

style(email): Message dark/light mode handling#1259

Merged
evanhutnik merged 1 commit intomainfrom
evan/google-calendar-invite
Jan 30, 2026
Merged

style(email): Message dark/light mode handling#1259
evanhutnik merged 1 commit intomainfrom
evan/google-calendar-invite

Conversation

@evanhutnik
Copy link
Copy Markdown
Contributor

@evanhutnik evanhutnik commented Jan 30, 2026

Fix email dark mode styles conflicting with app theme

Problem:
Email HTML content often includes @media (prefers-color-scheme: dark) CSS rules that automatically apply dark mode styles when the user's system is in dark mode. We should ignore these because we do own themes independent of the user's OS light/dark mode. We also do our own text colour handling for dark/light.

Solution:
Strip prefers-color-scheme media queries from email CSS during HTML parsing. This ensures email content displays consistently regardless of the user's system theme.

The tests don't actually display what the FE displays as they don't include the logic above the transform-email-colors.ts. Will update the test framework later to better represent what we see on the FE.

Before:
image

After:
image

Before:
image

After:

image

@evanhutnik evanhutnik requested a review from a team as a code owner January 30, 2026 19:40
@github-actions
Copy link
Copy Markdown

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jan 30, 2026


Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


Copy link
Copy Markdown
Contributor

@synoet synoet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Job!

@evanhutnik evanhutnik merged commit f26b9a5 into main Jan 30, 2026
23 checks passed
@evanhutnik evanhutnik deleted the evan/google-calendar-invite branch January 30, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants