Comply with the default_theme value for the first load of the website (when theme_switcher = true)
kbrault opened this issue · comments
Feature Request
Summary
When theme_switcher = true and default_theme = "light" --> the default theme loaded should be the light one.
In practice, even if the default_theme is light and theme_switcher is true, the dark theme is always loaded the first time (when cookies are empty).
Motivation
I wish the loaded theme would respects the default_theme value for the first load of the website.
Hi Kévin!
Thanks for requesting this feature. One note:
the dark theme is always loaded the first time (when cookies are empty)
This should only be the case if your system is using the dark theme. The current behaviour is to follow the OS preference when the theme switcher is enabled. If you switch to light theme, the site should also show the light theme. The default_theme
is used as fallback when JS is disabled.
That said, you're right, it does make more sense to use the default_theme
both when JS is disabled (current) as well as when it's enabled.
This will be a breaking change, but I think it's worth it.
Working on it!