Get the latest tech news

Overengineered Anchor Links


Learn about the 'overengineered anchoring' pattern, a technique to improve the user experience of scrollable content.

The most simple solution is to add We calculate the height of the padding by taking the delta between the last heading and the lowest point the anchor trigger can reach. You might want to stop here before your product manager starts giving you puzzled looks, wondering how “fixing anchor links” has suddenly turned into a three-week epic. We use MSE because it heavily penalizes large deviations, pushing the system towards a state where most virtual headings are close to their original spots, while still satisfying our reachability constraints.

Get the Android app

Or read this on Hacker News