Pog, IconButton: bugfix for rotated icons on iPhone #2730
Merged
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.
Suggestion cannot be applied right now. Please check back later.
This is a weird one.
To support RTL languages, we rotate some icons by 180 rather than use a different SVG. On mobile Safari (device only!), this presents a problem:
Apparently this is a known bug on mobile Safari going back to at least 2015 (!) and still not fixed. Actually, it's kind of a combination of two bugs:
Though it wouldn't be a shippable solution, I explored the "90° problem" by adjusting our rotation to 179°. The results are…not great:
It turns out the real solution is to add the CSS property
perspective
to the surroundingdiv
— something usually used with 3-D objects ¯_(ツ)_/¯Therefore adding this property to Pog should solve this issue for IconButton and (hopefully) all other places where it might arise.
Links