re: Add Dark Mode to your Websites with CSS VIEW POST


For IE you could simply have a "theme-dark.css" and "theme-light.css" (and also "theme-print.css" for... Printing) then use server or JavaScript code to include the suitable CSS file on the fly.


How about using jQuery local storage?


I think loading jQuery is overkill to only keep a single value in a cookie or local storage.

I prefer to stay as close to W3C standards as possible : most of the time a commented code snippet can do the job as well, and greatly reduce potential security flaws versus any library.

That's true, pure JS often results better than libraries. Thanks! 😉👍

Code of Conduct Report abuse