Invidious: Support "prefers-color-scheme"

Created on 29 May 2019  路  3Comments  路  Source: iv-org/invidious

Although not much supported (yet), this would switch Invidious to the dark theme automatically when the browser indicates a dark color scheme is preferred (e.g. on Linux when the user has a dark system theme).

In time this could probably remove the need for a toggle between light and dark mode entirely. For now I would have the setting have a 3rd option "auto" which is the light theme when "prefers-color-scheme" is not supported, or the preferred theme when it is supported. This option should probably be the default.

enhancement help wanted

Most helpful comment

Definitely looks interesting. I'll probably wait on adding this until there's an official spec, but if there's a PR for adding support before then I'd be happy to take a look.

All 3 comments

Definitely looks interesting. I'll probably wait on adding this until there's an official spec, but if there's a PR for adding support before then I'd be happy to take a look.

It doesn't seem like this constitutes an "official" specification, but the CSS Working Group's Media Queries Level 5 Editor's Draft contains prefers-color-scheme: https://drafts.csswg.org/mediaqueries-5/#descdef-media-prefers-color-scheme

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tmiland picture tmiland  路  4Comments

apfelchips picture apfelchips  路  5Comments

SebKranz picture SebKranz  路  3Comments

Rb4eogrl picture Rb4eogrl  路  3Comments

elypter picture elypter  路  4Comments