darkroomengineering / lenis

How smooth scroll should be

Home Page:https://lenis.darkroom.engineering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question and request for help

gyurmey2 opened this issue · comments

Hi! I made a parallax effect for the footer using vanilla CSS. The parallax effect works, but at the same time the smooth scrolling at the bottom of the page stops working.

Is there any way to do this?

To Reproduce
https://codepen.io/gyurmey2/pen/NWMErqQ

#footer {
  [...]

  /* A troublesome part */
  translate: 0 200%;
}

It seems like your animation is changing the document dimensions, that's a bit problematic for the future. To fix that you can use __experimental__naiveDimensions: true, consider this as a hotfix since this options is not official yet.

Wow! Works great! Thank you very much.

I've noticed that it works fine while scrolling, but the issue arises when jumping using a link. @clementroche would you please take a look?