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

App-header diferent scroll-target has jaggering animation #575

Open
1 task done
KevinAsher opened this issue Jan 14, 2019 · 0 comments
Open
1 task done

App-header diferent scroll-target has jaggering animation #575

KevinAsher opened this issue Jan 14, 2019 · 0 comments

Comments

@KevinAsher
Copy link

Description

When using the app-layout with background-image and scroll effects, there is a performance hit if the scroll target of the app-header is not the html root element. Apparently the background image is getting repainted at every frame render.

Expected outcome

Animation of the header should run without jaggering.

Actual outcome

Animation of the header lags behind the scroll of the page.

Live Demo

https://stackblitz.com/edit/owwd62

Steps to reproduce

  1. Open DevTools at the link provided above
  2. Enable Paint Flashing at More Tools > Rendering
  3. Scroll the page, notice the green area constantly flashing (repaints)

It's hard to see the jaggering even with CPU throttling on the Devtools, but on mobile devices it becomes clear, for example, we saw quite some lag on a Moto G6.

Browsers Affected

  • Chrome
  • Not tested in other browsers

Proposed Solution

At this blog post, the author's solution seems to work, I've made some local changes in the css of the app-header to use pseudo elements (especially #backgroundFrontLayer and #backgroundRearLayer) and it seems to work.

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

No branches or pull requests

1 participant