jeudi 14 mai 2020

Google Chrome tests showing Google Search results in a dark theme that syncs with Android 10’s dark mode

The introduction of a system-wide dark mode toggle in Android 10 has had a massive effect on the UI designs of many Android apps. A lot of Android apps have built-in dark themes now, and many of these apps also sync their dark theme with Android 10’s toggle. Google Chrome already does this for its toolbar and settings pages, but soon it’ll also darken Google Search results in sync with Android 10’s dark mode toggle.

Google first introduced dark mode support as a feature flag in Chrome browser version 74. They later introduced a dedicated “Themes” section in Chrome’s settings, and they also added a feature flag to render all web content using a dark theme. While it’s currently possible to display Google search results in a dark theme by using the #enable-force-dark feature flag, doing so may break the experience of many websites that haven’t been designed with darker background colors in mind. With the new #enable-android-dark-search feature flag that was just merged in the Chromium Gerrit, though, you’ll be able to show darkened search page results so long as Chrome’s dark mode is enabled. And since Chrome’s dark mode can be set to sync with the “system default” theme, that means the darkened search results can sync with Android 10’s system-wide dark mode toggle.

This feature is still a work-in-progress, though, as Google search results weren’t being darkened when I enabled the feature flag on a freshly built Chromium APK running on a Pixel 4 on Android 10. As 9to5Google pointed out last week when the commit first emerged, Google could have accomplished this goal through the “prefers-color-scheme” media CSS feature. However, that doesn’t seem to be the approach that Google is taking here.

In a related commit, Google details how the Chrome browser will show darkened search results when the user has Android 10’s dark mode enabled. The description states that “when the user is in night mode and visits Google search (homepage or results),” Google Chrome will “append an extra URL parameter to indicate that this user should get the darkened version of the website.” It seems that Chrome will append ?cs=1 to any Google Search URL if the user has dark mode enabled. Here’s an example of how this URL parameter darkens the Google Search results page:

Google Chrome light theme search results Google Chrome dark theme search results

The #enable-android-dark-search feature flag is currently available in the latest Chromium build but will eventually make its way over to Dev, Beta, and Stable releases. We’ll be tracking this feature as its development progresses.

The post Google Chrome tests showing Google Search results in a dark theme that syncs with Android 10’s dark mode appeared first on xda-developers.



from xda-developers https://ift.tt/2Z4SKt2
via IFTTT

Aucun commentaire:

Enregistrer un commentaire