Scroll Snapping

May 19th, 2025
tech
It's been several years since paying attention to the web platform was a big part of my full time job, and I was curious if I'd missed any interesting additions. I did some poking around with Claude and ended up finding something neat, but a bit different than I was looking for: scroll-snap-type.

Scrolling through long lists of things I've often been mildly frustrated at how much precision I need. I want to move down a bit, perhaps to see the next post in a feed, but without going a bit too far and losing the first few lines. Looking through Claude's output I saw:

Scroll snap: Control scroll positioning with scroll-snap-type (2019)

Looking on MDN it seems to offer just what I was looking for: scrolling that tries to avoid splitting content.

The main place on my website where I've wanted this are my pictures, and I've implemented it there. Give it a try!

The code changes were really simple:

html, body {
  scroll-snap-type: y proximity;
  scroll-padding: 0;
}
figure {
  scroll-snap-align: start;
}

While I didn't see other things in Claude's list of newish features that seemed exciting, is there anything else neat I might have missed?

Comment via: facebook, lesswrong, mastodon, bluesky, substack

Recent posts on blogs I like:

Retrospective on life tracking and effectiveness systems

I’ve been doing life tracking for around 10 years, and this post is looking back at some things I learned from the data (since my previous retrospective in 2017). I also review various productivity / effectiveness systems I have tried and which ones have …

via Victoria Krakovna July 4, 2025

Linkpost for June

Effective altruism, policy, social justice, reality's surprising amount of detail, short stories

via Thing of Things July 2, 2025

Elixir's Last Dance

On May 18th, the contra dance band Elixir had their last gig ever. The dance was packed: there were three hundred people. It was the only dance BIDA has ever done where they sold tickets. People flew from across the country just to hear Elixir play one la…

via Lily Wise's Blog Posts June 5, 2025

more     (via openring)