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

'parallax-container' img not loading. Load perfectly inside regular containers [with codepen] #6592

Closed
96312 opened this issue Aug 25, 2020 · 3 comments

Comments

@96312
Copy link

96312 commented Aug 25, 2020

Expected Behavior

img should load inside

<div class="parallax-container">
			<div class="parallax">

but it does not show up.

Current Behavior

https://codepen.io/flyingDonut/pen/bGpqRpg

Possible Solution

Looking for solution or if this is a mistake on my part.

Steps to Reproduce (for bugs)

Copy and paste the html code in codepen in VSC and open file in a browser.

Your Environment

cc: @Dogfalo @DanielRuf

@96312
Copy link
Author

96312 commented Aug 25, 2020

Just spent a solid 2 hours trying to figure it out.

Found this snippet in the css file:

parallax-container .parallax img {
	opacity: 0;
	...
}

Setting the opacity back to 100 gets the img back solves the issue. Any particular reasons for this default value?

@DanielRuf
Copy link
Contributor

See https://github.com/Dogfalo/materialize/blob/v1-dev/js/parallax.js#L100

I do not know the reasons. Probably a workaround to do not show loading images and to prevent possible rendering bugs.

But this is still the original rewritten code from 3 years ago.

@96312
Copy link
Author

96312 commented Aug 25, 2020

Gotchu, thanks for the follow-up Daniel. Maybe I'll leave the value to 100 for now.

@96312 96312 closed this as completed Aug 25, 2020
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

2 participants