Detect Dark Mode Using Javascript
If you want to check if dark-mode is enabled somewhere in your code, you would simply check if `matchMedia` exists on the browser and check if it has `prefers-color-scheme` set to dark.…
If you want to check if dark-mode is enabled somewhere in your code, you would simply check if `matchMedia` exists on the browser and check if it has `prefers-color-scheme` set to dark.…