Here’s a situation anyone who uses dark mode has encountered: you’re reading email in a dark-themed client, the interface looks comfortable, and then you open a newsletter or a promotional message that was built for a white background. The email’s background punches through the dark chrome of your app, flooding the screen with white. Or the reverse: a light-themed app, an email with dark styling, and the text becomes difficult to read.
No global theme change fixes this for just one message. Until now, the options were: live with it, or change your system settings and change them back.
cji.email now offers a per-message background toggle that solves this without touching your global theme.
The Technical Root of the Problem
Email bodies are rendered inside an isolated HTML iframe. This isolation is intentional — it prevents email stylesheets from leaking into the surrounding application interface. But the isolation cuts both ways: the email’s own CSS was written by the sender, usually for a light background, and the application can’t simply override it without potentially breaking the email’s layout and colors.
The email’s background is the one thing cji.email can control without touching the email’s own markup: the background-color and color of the iframe’s body element — the canvas the email sits on.
Three States, One Button
In the message detail toolbar, there is now a theme toggle button. Clicking it cycles through three states:
| State | What it does |
|---|---|
| Auto | The iframe background matches the current app theme (default) |
| Light | Forces a white background with dark text, regardless of app theme |
| Dark | Forces the app’s dark palette onto the iframe, regardless of app theme |
The same option appears in the message dropdown menu, with a dynamic label showing the current state — “Auto,” “Light,” or “Dark” — so you always know where you are.
Per-Message and Ephemeral
The toggle is scoped to the current message and resets to Auto when you navigate to a different email. This is a deliberate design choice.
Most emails are readable in the default theme. The toggle is a correction tool for the cases that aren’t — a specific newsletter, a richly styled announcement, an email from a sender who hardcoded dark backgrounds. You shouldn’t have to undo the setting every time you move on.
The state that drives the toggle is a Svelte 5 $state variable scoped to the MessageDetail component. It doesn’t persist to localStorage, it doesn’t sync to the backend, and it resets cleanly. No bleed between messages.
What cji.email Doesn’t Do
Some email clients attempt to automatically recolor emails for dark mode by modifying the email’s DOM — inverting colors, swapping background properties, adjusting image filters. This approach is sometimes called “forced dark mode.” The results are unpredictable: branded colors shift, images get color-inverted, and carefully designed HTML emails break in ways that are hard to anticipate.
cji.email doesn’t touch the email’s markup. It sets the iframe body’s background and text color — the canvas — and leaves the email’s own styles intact. This means an email that hardcodes color: white in its own stylesheet will still show white text on a forced-dark background. That’s the honest tradeoff: safety over completeness.
The per-message toggle gives you a direct, predictable control that works correctly in every case it’s designed for, rather than an automatic system that works approximately in most cases and breaks unpredictably in others.
The Kanban Context
cji.email organizes email as a Kanban board. When you move a message to a “Reading” column, you’re making a deliberate choice to engage with that content. The per-message background toggle fits that deliberate engagement model: you see the email, you decide how you want to read it, you adjust if needed — and nothing else changes.
For people who process large volumes of email from varied senders — newsletters alongside transactional notifications alongside colleague replies — the ability to quickly correct the reading environment for a specific message makes a qualitative difference in comfort over the course of a session.
Getting the Feature
The per-message background toggle is available in the current build of cji.email. Open any email and look for the theme icon in the message toolbar. Click once to switch to light, again to switch to dark, once more to return to auto. No configuration required.