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

The .sr-only utility class causes browser repaints in overflowing divs #24906

Closed
bbthorntz opened this issue Nov 29, 2017 · 4 comments
Closed

Comments

@bbthorntz
Copy link

After much research to removing scroll lag from our app, I discovered that elements with the .sr-only class cause repaints when scrolling in overflowing divs.

Browser: Chrome
Operating System: Mac OSX Sierra

Please see the reduced test case here:
https://codepen.io/bbthorntz/pen/pdxLzd

In Chrome, with 'Inspector -> Rendering -> Paint Flashing' enabled, you can see that the presence of the element with the .sr-only class causes paint flashing. If you remove this element, the paint flashing stops.

Removing the clip-path property from the class appears to fix the issue.

I have yet to test whether this affects other browsers/operating systems.

@gstreetmedia
Copy link

I can confirm that this causes the same issue on Windows & Android Chrome. Android has probably the biggest impact as it makes scrolling almost unusable.

@XhmikosR
Copy link
Member

@mdo: thoughts how to proceed?

Also, has anyone filed a bug report in Chromium?

@mdo
Copy link
Member

mdo commented Dec 31, 2017

@XhmikosR Updating the class to remove the clip-path is probably best way forward. Chrome bug would be great, too.

@XhmikosR
Copy link
Member

XhmikosR commented Jan 3, 2018

@mdo: do you think you could have this sorted for the stable?

I'm not familiar with the current clip-path approach, so I don't know if just removing it is good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants