Reputation: 29
For normal browsers we have query:
@media (prefers-color-scheme: dark) {
}
But this in not working for fb in-app browser, anyone knows a way to detect it there?
Upvotes: 1
Views: 227
Reputation: 2559
Facebook's in-app browser uses a so-called WebView to render the content. On Android, WebViews can support prefers-color-scheme
, but it looks like Facebook haven't set the DARK_STRATEGY_PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING
mode that would be necessary for this to work. If Facebook doesn't change this, the only solution is to use a proper browser.
Upvotes: 1