ampproject / ampproject/amphtml
Support `prefers-color-scheme` media query in AMP emails (Dark Mode)
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Gmail's automatic dark mode for emails can be hit or miss, and I think AMP has the potential to improve on it by supporting dark mode media queries like this:
```css
@media (prefers-color-scheme: dark) {
/* dark-mode-only CSS */
}
```
For example, I use images to display the trash icon and plus button in the email below:
| Light Mode | Dark Mode |
|------------|------------|
|  |  |
But these images automatically get inverted on dark mode, making them appear invisible.
I wish I had more control over how dark mode renders my emails.
### Alternatives Considered
An alternative (for my use case, anyway) would be allowing `
Contributor guide
Assessment
This issue has not been assessed yet.