Definition
Dark mode CSS in email detects whether the recipient's email client is in dark mode and applies alternative styles. Without dark mode optimisation, emails with white backgrounds become blinding, transparent images lose their edges, and coloured text can become unreadable.
Implementation
@media (prefers-color-scheme: dark) {
.email-body { background-color: #1a1a1a !important; }
.email-text { color: #e0e0e0 !important; }
}
Key considerations:
- Use
!importantbecause email clients often inject their own dark mode styles - Invert logos and images with transparent backgrounds by adding a dark-mode-specific version
- Test link colours — dark backgrounds require lighter link colours
- Some clients (Outlook, Gmail) auto-invert colours, so manually override where needed
Why It Matters
Over 30% of email opens now happen in dark mode. Emails not optimised for dark mode can be unreadable or visually jarring, reducing engagement and damaging brand perception.
Related Glossary Terms
Accessible CTA (Email)
An accessible CTA is a button or link coded with sufficient colour contrast, visible focus states, descriptive screen-reader text, and a minimum touch target of 44×44 pixels.
AMP for Email
AMP for Email is a Google-developed framework that allows email messages to include interactive elements like forms, carousels, accordions, and live content. It turns static emails into dynamic, interactive experiences directly inside the inbox.
Dark Mode
Dark mode in email refers to how email clients render messages when the recipient has dark mode enabled. It affects colour display, image rendering, and readability. Designers use CSS media queries and hybrid coding techniques to control the dark mode appearance.
Drag-and-Drop Email Editor
A drag-and-drop email editor is a visual interface that allows marketers to build email layouts by dragging content blocks into place without writing HTML or CSS code.
Dynamic Content
Dynamic content in email refers to content blocks that change based on subscriber data, behavior, or preferences within a single email send.
Email Accessibility Guidelines
Email accessibility guidelines ensure emails are usable by people with disabilities, following WCAG standards for screen readers, colour contrast, keyboard navigation, and readable content.