Skip to content

fix: UIUserInterfaceStyle is undefined for iOS <= 11 #7931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 16, 2019

Conversation

vchimev
Copy link
Contributor

@vchimev vchimev commented Oct 9, 2019

PR Checklist

Fix that UIUserInterfaceStyle is undefined for iOS <= 11.
Add tests for the system appearance property and system appearance root view CSS classes.

Relates to #7800.

@cla-bot cla-bot bot added the cla: yes label Oct 9, 2019
@MartoYankov
Copy link
Contributor

MartoYankov commented Oct 10, 2019

The property userInterfaceStyle doesn't exist on UITraitCollection before iOS 12. This isn't obvious in the code. I think it would be more obvious if you check for major version at the beginning of the systemAppearance getter and if < 12 return light or undefined explicitly. Maybe null is better than undefined.

@vchimev vchimev force-pushed the vchimev/dark-mode/fixes branch from 5a21341 to fef9776 Compare October 10, 2019 08:02
@SvetoslavTsenov
Copy link
Contributor

test --ignore cuteness uitests#vchimev/dark-mode/fixes ios10 ios11 ios12 ios13

@dtopuzov
Copy link
Contributor

test --ignore cuteness uitests#vchimev/dark-mode/fixes ios10 ios11 ios12 ios13

@manoldonev
Copy link
Contributor

test --ignore cuteness uitests#vchimev/dark-mode/fixes ios10 ios11 ios12 ios13

@manoldonev manoldonev merged commit 6c71394 into master Oct 16, 2019
@manoldonev manoldonev deleted the vchimev/dark-mode/fixes branch October 16, 2019 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants