Files
discourse_theme_ran/javascripts
Martin Brennan 96da1d3439 FIX: Issues with FOUC and dark mode when switching palettes (#99)
Followup 6a4b979514

In this commit I changed how we load the selected palette
stylesheet so the system specs would know when the CSS is actually
loaded, however this introduced an issue where the user would see
a FOUC when switching palettes. I also introduced a bug where
if you chose to force dark mode then switched the palette, you would
see light mode instead.

This commit fixes both issues, by swapping the CSS link with a preloaded
one then waiting for the preload before switching the href of the
existing link, and removes `mode` shenanigans causing the light mode
issue.
2025-04-01 13:07:26 +10:00
..
2025-02-24 15:59:49 -06:00