discourse/app/helpers
Osama Sayegh 787d512c03
FIX: Add theme-color <meta> tag when a dark scheme is selected (#18747)
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.
2022-10-26 07:18:05 +03:00
..
application_helper.rb FIX: Add theme-color <meta> tag when a dark scheme is selected (#18747) 2022-10-26 07:18:05 +03:00
common_helper.rb FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
email_helper.rb DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
embed_helper.rb FIX: Display small post actions when embedding a topic (#9278) 2020-03-26 09:07:41 -03:00
emoji_helper.rb FEATURE: Render emojis on GitHub labels when oneboxing an issue. (#13531) 2021-06-25 14:48:36 -03:00
list_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
posts_helper.rb FEATURE: use canonical links in posts.rss feed (#16190) 2022-03-15 20:17:06 +11:00
qunit_helper.rb FIX: Defer scripts on theme-tests route (#17171) 2022-06-21 12:44:31 +08:00
splash_screen_helper.rb DEV: Compile splash screen JS with ember-cli before inlining (#18150) 2022-09-01 09:58:48 +01:00
topic_post_bookmarkable_helper.rb FIX: Use registered bookmarkables for BookmarkManager (#16695) 2022-05-11 09:51:03 +10:00
topics_helper.rb Improve support for old browsers (#9515) 2020-04-29 21:40:21 +03:00
user_notifications_helper.rb DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00