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

visibility:hidden causes delay before rendering #709

Closed
kinglozzer opened this issue Oct 2, 2019 · 1 comment
Closed

visibility:hidden causes delay before rendering #709

kinglozzer opened this issue Oct 2, 2019 · 1 comment

Comments

@kinglozzer
Copy link

Describe the bug
When using the following CSS:

img.lazyload:not([src]) {
    visibility: hidden;
}

There is a noticeable delay before the image gets loaded. I’m not sure why - Chrome’s JS profiler suggests it’s not actually doing anything at all (“idle frame” for a second or so before it attempts loading). It also happens in Safari and Firefox (MacOS 10.14.5 here). It doesn’t happen when using opacity:

img.lazyload:not([src]) {
   opacity: 0.001;
}

To Reproduce
https://jsbin.com/zecodopaqo/edit?html,css,output

@aFarkas aFarkas closed this as completed in 7ac087e Oct 5, 2019
aFarkas added a commit that referenced this issue Oct 5, 2019
@aFarkas
Copy link
Owner

aFarkas commented Oct 5, 2019

Thank you. That was quite a bug!!!

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 a pull request may close this issue.

2 participants