DEV Community

Tom
Tom

Posted on

Contain scrolling, contain reading

2 interesting articles in this week's Frontend Focus.

  1. Contain scrolling behavior

When you add scrolling behavior to a certain container you sometimes do not want to continue scrolling when you reach the end of the container. This can be achieved with by setting the CSS overscroll-behavior property to contain. Read more in Prevent Scroll Chaining With Overscroll Behavior.

  1. Restrict width of text container

Swyx reminds us about the simple max-width: 70ch; property to keep texts readable on large screens. He also links to some bookmarklets so you can apply readability to whatever website (for example Wikipedia): 100 Bytes of CSS to look great everywhere.

Top comments (0)