1

I am using Ionic 6 / Angular.

I have noticed that in variables.scss contains:

@media (prefers-color-scheme: dark) {
  ...
}

The issue is that unless I rename dark to for example:

@media (prefers-color-scheme: dark-off) {
  ...
}

In Android phones the mode is always dark in display, no matter if I select light or dark, it's always dark.

How can I fix this?

nxv
  • 13
  • 4

1 Answers1

0

If you want to have a light theme, then you can comment out the dark mode css in variables.scss. It is not always dark mode, it will follow the default theme that your android device is using. I guess your device is on dark mode, try to change it to light mode and you will see it turn to light mode.

dvbngln
  • 301
  • 2
  • 12
  • I actually want to have both modes, which works great in IOS but Android just gives me dark always unless I comment out dark mode :( – nxv Sep 05 '22 at 11:13
  • Are you testing it using an emulator or a real device? If you are using a real device, then what is the theme set on your device? – dvbngln Sep 05 '22 at 12:05
  • Both the emulator and the real device – nxv Sep 05 '22 at 14:13