79821822

Date: 2025-11-17 00:38:18
Score: 0.5
Natty:
Report link

Really smooth scrolling (viewport "clings" to el):

let done = false;
function updateScroll() {
    ref.scrollIntoView({ block: "nearest" });
    if (!done) requestAnimationFrame(this);
}
requestAnimationFrame(updateScroll);
setTimeout(() => done = true, 150); // 150ms
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: horsey_guy