-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issue Integrating scroll-timeline with Next.js #240
Comments
Where do you define your styles? The polyfill – currently - only works with rules present in inlined style blocks. Don’t work:
The latter is tracked in #78 |
I'm using Next.js with Styles are dynamically generated and injected into the Here you can find an example of this kind of setup: |
I'm having the same issue can confirm the polyfill has no effect in a brand new next.js project <Script async src="https://flackr.github.io/scroll-timeline/dist/scroll-timeline.js" /> Put that into my layout component, and it seems to have no effect. I've successfully used this previously in an Astro project, with no issues. Would really love to get this working in next.js!! |
The polyfill can’t be loaded using |
I put some ideas on #260 for how we could handle loading the polyfill asynchronously and still detect existing or already finished css animations. |
Did any of you guys managed to get it working on nextJS? |
Environment
Description
I'm encountering an issue integrating the
scroll-timeline
polyfill into my Next.js project, aiming to enable scroll-linked animations using CSS Scroll Timeline. Despite correctly importing the script in mypages/_app.tsx
file, the polyfill does not activate, and animations linked to scroll or view timelines do not trigger as expected.Steps to Reproduce
pages/_app.tsx
file of a Next.js project, importScript
fromnext/script
.scroll-timeline
polyfill using theScript
tag as follows:animation-timeline: scroll();
andanimation-timeline: view();
to define scroll-linked animations.Expected Result:
Actual Result:
animation-timeline: scroll();
noranimation-timeline: view();
have any effect, and the expected animations do not occur.Attempted Solutions
Any assistance or insights into resolving this integration issue would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: