mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:02:24 +08:00
787d512c03
Meta topic: https://meta.discourse.org/t/meta-theme-color-is-not-respecting-current-color-scheme/239815/7?u=osama. This commit renders an additional `theme-color` `<meta>` tag for the dark scheme if the current user/request has a scheme selected for dark mode. We currently only render one `theme-color` tag which is always based on the user's selected scheme for light mode, but if the user also selects a scheme for dark mode and uses a device that's configured to use/prefer dark mode, the Discourse UI will be in dark mode, but any parts of the browser/OS UI that's colored based on the `theme-color` tag, would use a color from the user's selected light scheme and look inconsistent with the Discourse UI because the `theme-color` tag is based on the user's selected light scheme. The additional `theme-color` tag has `media="(prefers-color-scheme: dark)"` and is based on the user's selected dark scheme which means any browser UI that's colored based on `theme-color` tags should be able to pick the right tag based on the user's preference for light/dark mode. |
||
---|---|---|
.. | ||
about | ||
admin/backups | ||
application | ||
badges | ||
categories | ||
common | ||
default | ||
embed | ||
exceptions | ||
finish_installation | ||
groups | ||
invites | ||
layouts | ||
list | ||
metadata | ||
offline | ||
posts | ||
published_pages | ||
qunit | ||
robots_txt | ||
safe_mode | ||
search | ||
session | ||
sitemap | ||
static | ||
tags | ||
topics | ||
user_api_keys | ||
user_notifications | ||
users | ||
users_email |