A Front-end developer passionate about immersive & interactive user experience and a technical writer, who enjoys breaking down complex topics into comprehensible bits digestible to even 5-year-olds.
A Front-end developer passionate about immersive & interactive user experience and a technical writer, who enjoys breaking down complex topics into comprehensible bits digestible to even 5-year-olds.
You don't need any JS for dark mode switching, easily do it with CSS only: css-tricks.com/dark-modes-with-css/
You might want to combine that CSS with a cookie or something to omit the switch over if someone explicitly switches for a site.
True. But this was a beginners guide so I didn't want to do anything extra.
I'm aware of that method but it has little support with most browsers and as such is unusable in a production website/web app.
But like I said initially, there are several ways to go about implementing anything.