Skip to content
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

Remove translateZ(0) on modal overlay #5478

Merged

Conversation

nolanlawson
Copy link
Contributor

This appears to have been added in cca41ea and AFAICT it is not needed. I deployed this fix to malfunctioning.technology and tested opening a modal gallery and swiping left and right in both mobile Firefox and mobile Chrome on a Nexus 5, and didn't observe any performance degradation compared to master.

In principle, usages of translateZ(0) are very suspect because they force the browser to create a GPU layer. It's almost always better to use will-change as documented here.

Also, the overlay element that we animate now is .modal-root, not .modal-root__overlay, and .modal-root already has will-change: opacity applied to it.

@unarist unarist merged commit 02f7f36 into mastodon:master Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants