Artboard 16light, inspiration, solution, idea, innovation,ionicons-v5_logosGoogle Sheets iconSwift icon
Published at
Updated at
Reading time
1min
This post is part of my Today I learned series in which I share all my web development learnings.

Today I came across a release post on www.fxsitecompat.dev. The post included that overflow: clip has been unprefixed in Firefox Nightly.

The overflow: clip is similar to overflow: hidden; both values define that overflowing content should not be visible. The difference between those is that clip forces elements not to be scrollable, whereas elements with overflow: hidden are still scroll containers.

The surprise for me is that elements with overflow: hidden are still scrollable using element.scroll(x, y). I could see this come in handy when there is an exceptional need for custom scroll behavior.

Reimplementing scroll-behavior most likely comes with many accessibility challenges, but hey... maybe there are good examples out there.

If you want to play around with it, have a look at this CodePen or see it in action in this tweet.

Was this TIL post helpful?
Yes? Cool! You might want to check out Web Weekly for more quick learnings. The last edition went out 14 days ago.

Related Topics

Related Articles