Skip to content

[mediaqueries-5] Clarification on prefers-color-scheme issues #3278

Closed
@jonathanKingston

Description

@jonathanKingston

Whilst working on trying to implement this for Firefox I and @emilio noticed some ambiguity with the spec text.

The prefers-color-scheme media feature is used to detect if the user has requested the system use a light or dark color theme.

  1. Does it really matter if this is a system or user agent preference? For example in non supporting operating systems Firefox could choose to pass light and dark when the user has enabled these themes and no-preference when they haven't.

  2. (prefers-color-scheme) never appears to match, however shouldn't it match whenever the user has a preference? Especially given the boolean context statement.

  3. We are at slight risk of sites never supporting no-prefererence given safari is only using light/dark and always returning true for no-preference.

/cc @grorg @emilio

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions