Only persist theme to localStorage when the user's choice differs from the OS preference. Clear it when they match so the prefers-color-scheme listener remains active and automatically tracks system theme changes. |
||
|---|---|---|
| .. | ||
| pages | ||
| partials | ||
| base.html | ||
Only persist theme to localStorage when the user's choice differs from the OS preference. Clear it when they match so the prefers-color-scheme listener remains active and automatically tracks system theme changes. |
||
|---|---|---|
| .. | ||
| pages | ||
| partials | ||
| base.html | ||