iOS notch color / interface color selector

When changing the interface color selector the meta name="theme-color" meta tags are not updated, thus causing sometimes the wrong color on an iPhone notch.

Repro (here on meta)

  • enable the interface color selector
  • set OS mode to “Light”
  • set Discourse interface color selector mode to “Light”
  • reload browser
  • meta tags look like
<meta name="theme-color" media="all" content="#ffffff">
<meta name="theme-color" media="none" content="#1a1a1a">

which correctly makes iPhone notch the correct color

  • switch Discourse interface color selector mode to “Auto”
  • media attributes for link class="light-scheme" and dark-scheme change correctly
  • theme-color meta tags stay the same ← bad
  • change OS mode to Dark
  • notch color does not change :scream:
  • refresh browser
  • HTML meta tags change to
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1a1a1a">
1 Like

This reminds me of Dark/Light Mode Toggle delivers mixed results when OS settings do not match toggle settings. Maybe that’s the same bug.

No, that’s something different, that’s a problem in the theme. I’ll post the solution in that topic.

1 Like

ANNOYING BUG if you have OCD like me D: