Closed Julien-Marcou closed 2 years ago
According to the documention (https://ionicframework.com/docs/theming/dark-mode) for Ionic v5, you don't have to do anything more than using the CSS Media Query @media (prefers-color-scheme: dark) in order to support native Dark Mode on mobiles.
@media (prefers-color-scheme: dark)
But this is not true.
As I undestand it, it was working natively with Cordova, but doesn't anymore with Capacitor (An issue has been opened on https://github.com/ionic-team/capacitor/issues/4677).
I think a disclaimer as below should be added to the documentation to warn the user about Capacitor not yet supporting this :
⚠ The CSS Media Queries prefers-color-scheme is not yet supported with Capacitor integration, you can install a third party plugin to fix this issue https://github.com/robingenz/capacitor-android-dark-mode-support
prefers-color-scheme
Moved to https://github.com/ionic-team/ionic-docs/issues/2078
According to the documention (https://ionicframework.com/docs/theming/dark-mode) for Ionic v5, you don't have to do anything more than using the CSS Media Query
@media (prefers-color-scheme: dark)
in order to support native Dark Mode on mobiles.But this is not true.
As I undestand it, it was working natively with Cordova, but doesn't anymore with Capacitor (An issue has been opened on https://github.com/ionic-team/capacitor/issues/4677).
I think a disclaimer as below should be added to the documentation to warn the user about Capacitor not yet supporting this :