ionic-team / ionic-site

Repo for the ionicframework.com site
https://ionicframework.com
Apache License 2.0
453 stars 3.25k forks source link

Add disclaimer about Dark Mode for Capacitor #1607

Closed Julien-Marcou closed 2 years ago

Julien-Marcou commented 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.

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

Julien-Marcou commented 2 years ago

Moved to https://github.com/ionic-team/ionic-docs/issues/2078