You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add 'auto' to ColorSchemeOverride, deprecate 'unspecified'
Summary:
NOTE: 👋🏻 **This is an RFC**, additional and separate to the previous 2 diffs. Looking for feedback :)
Proposes an API tweak to `Appearance.setColorScheme()` to make it more idiomatic/understandable.
- Aligns with the CSS `color-scheme` property vocabulary, where `auto` means "defer to the system preference".
- Replaces the ambiguous `unspecified` (now deprecated), which gave no indication of the resulting behaviour.
See also:
- History of this API + return type narrowing in D102527387.
- Extended docs + diagram in react/react-native-website#5060.
**Alternative names considered**
- `'reset'` - Implies reversing a change, not deferring to system
- `'inherit'` - Weak — CSS inherit is element→parent, not app→OS
Changelog:
[General][Deprecated] - `Appearance.setColorScheme('unspecified')` is deprecated, use `'auto'` instead.
Reviewed By: cipolleschi
Differential Revision: D103841988
fbshipit-source-id: 474d0925ce9ee0ab79f87d0ff9ae86ae56ceb0aa
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.kt
0 commit comments