We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As here I would like to set up sal to disable animations below ceratin viewport (for example 768px). Where should I include it in a gatsby project?
I feel like it should be placed inside gatsby-browser.js, but then "sal is not defined".
Example code, copied from the link provided above.
const animation = sal(); const switchAnimations = () => { if (window.innerWidth < 768) { animation.reset({ selector: 'animated-element', once: true, }); } else { animation.reset({ // some other options }); } }; switchAnimations(); window.addEventListener('resize', switchAnimations);
The text was updated successfully, but these errors were encountered:
I agree this would be a useful feature, I'd like to disable the animations on mobile devices.
Sorry, something went wrong.
No branches or pull requests
As here I would like to set up sal to disable animations below ceratin viewport (for example 768px). Where should I include it in a gatsby project?
I feel like it should be placed inside gatsby-browser.js, but then "sal is not defined".
Example code, copied from the link provided above.
The text was updated successfully, but these errors were encountered: