dw08gm:
but does not say how to utilize system dark settings.
https://stackoverflow.com/questions/56393880/how-do-i-detect-dark-mode-using-javascript
to summarize, either use it directly in css
@media (prefers-color-scheme: dark)
but thats unwanted, what you want is alternate between css files. So
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
const newColorScheme = event.matches ? "dark" : "light";
});
this would do the job.
I pretty much hacked a dark mode in our shop. Our shop still uses a very very old modified Winchester Responsive template (original from picaflor-azul) thats the reason I am not that helpful in explaining what I all did because its rare to begin with.