feat(switch): :checked pseudo and color fixes #9790
Merged
+189
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.

PR Checklist
What is the current behavior?
Switches cannot be styled using the
:checkedpseudo selector.Switch color behavior differs between iOS and Android.
Android Switch colors are muted and not same as set.
What is the new behavior?
Switches can now be styled with the
:checkedselector.Switches now have the same behavior across iOS and Android.
Switch colors are exactly as set (no color filters etc applied).
BREAKING CHANGES:
Switch
colornow affects both unchecked and checked states on iOSSwitch
backgroundColornow affects both checked and unchecked states on iOSSwitch colors are now exactly as specified without any color filtering on Android (no more muted colors)
Migration: update
color,backgroundColorandoffBackgroundColorvalues (inline or in css) to the desired colors.