13
Views
1
Comments
How to prevent my webpage from adapting to dark mode?

I am working on email template. Everything's good until I realized that the email design on ios mail change whenever dark mode has been triggered.

How will I be able to force the CSS to stop adapting to dark mode?

Light mode:

Dark mode:

Rank: #355

Hi Arci,

You can the  prefers-color-scheme CSS media query feature. 

More info here: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

Ossama