Skip to content

defaultMode is ignored #156

@Teraskull

Description

@Teraskull

Describe the bug

Hi,

I am trying to force the mode to be light by default, regardless of the system preference. But it seems that mode-watcher-mode always defaults to system.

So if my systemPrefersMode is system/dark, I would expect defaultMode="light" to override that and use light by default, assuming the mode is not set in localStorage.

As the docs say:

Image

I tried setting track={false}, but that just stops the page from changing the mode dynamically when I change my Windows mode.

I am not sure if this is intended behavior, or I am missing something. Basically, I want to ignore whatever mode is inferred by prefers-color-scheme and use light. Users then can toggle whatever mode they want, but the initial one without localStorage keys stored should be light.

Reproduction

The Stackblitz template link is not working anymore.

Logs

System Info

N/A

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions