Closed josefaidt closed 3 years ago
Support prefers-color-scheme with window.matchMedia() to determine user theme on first visit.
prefers-color-scheme
window.matchMedia()
Current Behavior:
on visit, active theme choice is decided by
themes
Proposed Behavior:
light
dark
disablePrefersColorScheme
@dysfunc thoughts on the proposed prop to disable the new behavior?
Support
prefers-color-scheme
withwindow.matchMedia()
to determine user theme on first visit.Current Behavior:
on visit, active theme choice is decided by
themes
arrayProposed Behavior:
on visit, active theme choice is decided by
prefers-color-scheme
choice (will belight
ordark
and themes should have a palette with one of these names)themes
arrayChanges
disablePrefersColorScheme
? Forcing the new behavior may cause unwanted UX adjustments