Taking Control of the Browser Dark Mode with Ant Design and TailwindCSS for Dark Mode Wizardry
Everyone loves a well executed dark mode, me included. I think that having a full blast of white light in the middle of the night should be considered as bad as a slap in the face — you’re most definitely awake after getting it.
Hence, for the sake of my side project’s future users and their night owl eyesight, I’ve recently implemented user controlled dark mode.
Fundamentally, if you want to leave it up to the system and stop the user from custmoizing their theme, we can just use the (prefers-color-scheme: dark) match media and call it a day.