You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
overflow: auto displays scrollbars during animation #16
Not sure there is a good solution to this other than setting your styles appropriately. I dont think we can make any reliable determination of what the users desired styles are here. For example, we could put overflow: none durring the animation, but that would make the parent's scrollbars pop on/off during animation when there should be a scroll bar. Open to suggestions though.
Not sure there is a good solution to this other than setting your styles appropriately. I dont think we can make any reliable determination of what the users desired styles are here. For example, we could put overflow: none durring the animation, but that would make the parent's scrollbars pop on/off during animation when there should be a scroll bar. Open to suggestions though.
Closing with a docs tip in #258 📜 — AutoAnimate can't safely guess the overflow styles you want, but two CSS lines fix it on the container: scrollbar-gutter: stable (reserves the scrollbar's space so content doesn't jump while sizes change mid-animation) and overflow-x: clip if you don't need horizontal scrolling. If you still see weirdness with those, a repro and we'll dig in!
Activity
justin-schroeder commentedon May 27, 2022
Not sure there is a good solution to this other than setting your styles appropriately. I dont think we can make any reliable determination of what the users desired styles are here. For example, we could put overflow: none durring the animation, but that would make the parent's scrollbars pop on/off during animation when there should be a scroll bar. Open to suggestions though.
[-]css overflow auto animation exception[/-][+]`overflow: auto` displays scrollbars during animation[/+]ty-bt commentedon May 30, 2022
@justin-schroeder And the first animation after moving the scroll bar will be abnormal
Daneng66 commentedon Jun 17, 2023
@ty-bt Did you figure out a solution for this?
glekner commentedon Sep 24, 2024
@justin-schroeder why not do the following:
p.scrollHeight > p.offsetHeight)overflow: hiddenuntil the animation finishes.docs: tip for scrollbar flicker in overflow containers (#16) (#258)
justin-schroeder commentedon Nov 22, 2026
Closing with a docs tip in #258 📜 — AutoAnimate can't safely guess the overflow styles you want, but two CSS lines fix it on the container:
scrollbar-gutter: stable(reserves the scrollbar's space so content doesn't jump while sizes change mid-animation) andoverflow-x: clipif you don't need horizontal scrolling. If you still see weirdness with those, a repro and we'll dig in!