mui icon indicating copy to clipboard operation
mui copied to clipboard

Dark mode support via automatic CSS media query prefers-color-scheme

Open tonimelisma opened this issue 5 years ago • 1 comments

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?

tonimelisma avatar Oct 28 '20 22:10 tonimelisma

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.

amorey avatar Dec 19 '20 06:12 amorey