Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My problem with prefers-color-scheme is that there's no way to distinguish between “unknown preference” and “prefers light mode”. I'd like my website to be dark unless the user explicitly requests light mode, but the web people decided I can't do that.


I don't think this is technically true. You can do `prefers-color-scheme: light` or `prefers-color-scheme: dark`. IIUC if there is no preference neither of those should evaluate to true.

That being said I think most if not all browsers will always answer true to one of those.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: