New Pull Request: Dark Mode for Headline theme

I’ve implemented Dark Mode for the Headline theme. This adds a preference in the Theme settings to select Light, Dark or Auto.

If Auto is selected, dark mode will be enabled if the user’s browser indicates a preference for it.

The implementation is based on the colors and CSS that at the Casper theme uses for Dark Mode. The pull request is here:


can I use this by code injection?

My implementation involves a one-line change to default.hbs which can’t be done via code injection.

However, if you don’t want the option for Light mode or the option to for the mode to switch automatically, then it would be possible to read through my CSS, understand how to adapt it for that case, and then use code injection for a dark mode. It would be up to you to made that adaptation if you want to try it.

Site performance will be slightly better if code injection is avoided though. When CSS is implemented in screen.css, it can be loaded once and cached.

Whatever you add through Code Injection is loaded repeatedly on every page.