DEV Community

Tom
Tom

Posted on

2 1

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)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post