amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Support `prefers-color-scheme` media query in AMP emails (Dark Mode)

Open joshmoody24 opened this issue 9 months ago • 3 comments

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:

@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
Image Image

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 <svg> elements in AMP emails, because those can at least match the text color by doing fill=currentColor

Additional Context

No response

joshmoody24 avatar Mar 15 '25 01:03 joshmoody24