In the past when I wanted to have smooth scrolling on a website I'd just use this jQuery snippet by CSS-Tricks. It does exactly what I want and didn't require any javascript library (except jQuery).
These days I prefer to avoid using big libraries like jQuery too much, because I only use 5% of the functionalities while getting worse load times. Causing me to look for a vanilla JS version of the jQuery snippet provided by CSS-Tricks.
Is there an elegant way of implementing smooth scrolling by using vanilla JS?