FEATURE: Dark mode alternative logos (PR #10441)

  • adds 3 new site settings: logo dark, logo small dark and mobile logo dark
  • when the OS is set to dark mode, the dark logos will be included as alternatives using this picture element technique
  • when the color scheme being used is dark, the dark logos will be tried first with a fallback to the the regular logos (if no dark logos are set)

With this change, the https://github.com/discourse/discourse-alt-logo is no longer needed, its functionality will now be included in core. (The component still works with this change, I tested it locally, so sites using it should not break.)


I think it might be a good idea to either add this to our session or caps objects when the app boots up. Then the widget needn’t rely on the document.

This too - will encourage re-use too.

Thanks @eviltrout, I moved both to the Session model, it made more sense to me than caps, the latter groups what the browser is/isn’t capable of doing. In the session, we can also possibly update these values (for example, when the user disables dark mode in their profile).