studio-freight/lenis

Documentation improvement

haroldao opened this issue · 1 comments

Hey guys !

Just wanting to submit an issue I had.

I figured out where was the problem :

When there is height: 100% set to html, body (I use it on all my projects), the lib is not working.

E.g :

html, body{
  width: 100%;
  height: 100%;
}

A codepen as a DEMO : https://codepen.io/haroldao/pen/OJvgrXy
Normal DEMO (where it's working) : https://codepen.io/haroldao/pen/PoRpqXv

The solution:
Instead of height: 100%, we should set a min-height (min-height: 100%).

E.g :

html, body{
  width: 100%;
  min-height: 100%;
}

Thx for your help, i updated the documentation