-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Pre-hiding divs with "mobile: false" keeps divs from showing on mobile #455
Comments
Are you using the technique outlined in the User Experience Guide to prevent flickering? As mentioned in the guide if you're using the html.sr .load-hidden {
visibility: hidden;
} |
Yep, using the method at the bottom: html.sr .sr-header { visibility: hidden; } Currently just using the (min-width: 1024px) breakpoint as a workaround. |
Thanks for the report @dolanb12, I've found the bug and am working on the solution! |
Fantastic! Glad I could help.
|
Please try ScrollReveal |
Doesn't seem to be correcting the problem. But this could possibly be on my end. The style corrections in the head of the document seem to not be accessible in Chrome dev tools. Although when reverting back to the workaround, I still can't see the styling, but it's doing its job. scratches head |
Say we had something like this... <html>
<head>
<script src="https://unpkg.com/[email protected]/dist/scrollreveal.min.js"></script>
<script>
ScrollReveal({ mobile: false });
</script>
<style>
html.sr .load-hidden { visibility: hidden };
</style>
</head>
<body>
<h1 class="example load-hidden">Hello world</h1>
<script>
ScrollReveal().reveal('.example');
</script>
</body>
</html> The class This is what I understood to be your problem, and has been fixed in Also, it may be worth mentioning that ScrollReveal looks at the browser user agent (not media queries or screen size) to determine what is a mobile or desktop device. E.g: navigator.userAgent
// "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:62.0) Gecko/20100101 Firefox/62.0" If you are simply resizing the browser window, there won’t be any difference in ScrollReveal behavior. |
Hi @jlmakes, // my styles
.wrapper > .box {
html.sr & {
visibility: hidden;
}
} // my script
ScrollReveal().reveal('.wrapper > .box', {
interval: 100,
duration: 600,
distance: '0.6em',
easing: 'ease-in-out',
mobile: false,
}) Here's a pen in action. |
@elgandoz Ah you're right, I misunderstood. It does sound like a bug somewhere, because the class I’ll take a closer look. Update: Using FireFox Android emulation, ScrollReveal remains operational (i.e. |
I am expiring the same behaviour, is there any information on how to fix it?
Thanks! |
For reference, this is still an issue with the current version. |
I don't see default breakpoints provided to fix this issue. Any suggestions?
For now just using breakpoint (min-width: 1024px).
Example
Thanks!
The text was updated successfully, but these errors were encountered: