mui
mui copied to clipboard
Dark mode support via automatic CSS media query prefers-color-scheme
Hey,
all major browsers have supported the prefers-color-scheme CSS media query for over a year now. Would it be a good idea for mui to also support this functionality? In essence the web site would have two themes, a light and a dark, and the end user's browser chooses automatically which one to use based on user preference and/or system settings.
If this functionality is welcome, any tips on how to implement it?
Sure! That would be useful. Maybe there's a better way but I think the cleanest way to implement it is using css variables. Unfortunately this would break IE11 support so we'd also have to release it as a major version.