25 CSS Hacks Every Developer Should Know

Smooth scroll

Problem: adding smooth scroll to anchor links.

Solution: use `scroll-behavior`.

html {
  scroll-behavior: smooth;
}