Static
Get the user's preference for dark mode from local storage
'dark', 'light', or null
Get the user's system preference for dark mode
true if the user prefers dark mode
Initialize the theme from local storage (which falls back to system preference)
Runs InitializeTheme with the media query changes [ matching: (prefers-color-scheme: dark) ]
a cleanup function to remove the event listener
Set the theme to light, dark, or system in local storage and on the html element class list
light, dark, or null (which will use system)
Runs InitializeTheme with the local storage changes
Get the user's preference for dark mode from local storage