After activating the dark mode and clicking on any link inside the website the light theme quickly flickers before the page is set to the dark theme again.
An example would be when clicking on the on the posts page from the home page.
Affected browsers:
Firefox 94.0 (64-bit) on Ubuntu 20.04.3 LTS
Chrome Version 95.0.4638.69 (Official Build) (64-bit) on Ubuntu 20.04.3 LTS
iOS 14.8.1
After activating the dark mode and clicking on any link inside the website the light theme quickly flickers before the page is set to the dark theme again.
An example would be when clicking on the on the posts page from the home page.
Affected browsers: Firefox 94.0 (64-bit) on Ubuntu 20.04.3 LTS Chrome Version 95.0.4638.69 (Official Build) (64-bit) on Ubuntu 20.04.3 LTS iOS 14.8.1
According to StackOverflow this solution is to have a blocking change of theme before the page loads: https://stackoverflow.com/a/63033934
But it seams the theme is changed after the page is ready, hence the flicker: https://github.com/RatanShreshtha/DeepThought/blob/3596d4c1b975dfadd94efc150de10f5c7232eb6d/static/js/site.js#L171-L176