In low light places it is way better for man's eyes to see the light text on a dimmed background than vice versa. In modern operating systems you can change the general theme of the OS in settings to have it dark or light. By adding the above code in your CSS it will get the user preference from the operating system and show the website in the preference of the user.
Table of contents
AssumptionsExplanationImplementation using only CSSImplementing a toggle button (JavaScript)2 Comments
Sort: