Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add disclaimer about Dark Mode for Capacitor #2078

Closed
Julien-Marcou opened this issue Oct 5, 2021 · 1 comment
Closed

Add disclaimer about Dark Mode for Capacitor #2078

Julien-Marcou opened this issue Oct 5, 2021 · 1 comment
Labels
content Issues related to the contents of the documentation website

Comments

@Julien-Marcou
Copy link

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 ionic-team/capacitor#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 Julien-Marcou added the content Issues related to the contents of the documentation website label Oct 5, 2021
@jcesarmobile
Copy link
Member

I has never worked natively on Android WebView, not even in Cordova.
But starting in Chrome/system WebView 90, the WebView started respecting the app theme (not the system theme).
But turns out if you change the theme to DayNight it will use the system theme.
Newly created Capacitor 4 apps will use that theme by default, existing apps will need to change the theme. No plugins needed anymore, it's explained in the linked issue.

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Issues related to the contents of the documentation website
Projects
None yet
Development

No branches or pull requests

2 participants