mdn/content

Article on overflowing content needs updating

Open

#32,173 opened on Feb 8, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Markdown (22,427 forks)batch import
Content:Learn:CSSgoal: up-to-datehelp wanted

Repository metrics

Stars
 (8,900 stars)
PR merge metrics
 (Avg merge 7d 3h) (147 merged PRs in 30d)

Description

MDN URL

https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Overflowing_content

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

I linked from CSS Overflow to the Overflowing content guide, expecting it to be a helpful guide in how to think about the overflow property.

What doesn't feel right to me is that this guide mostly emphasizes the oldest overflow values: visible, hidden, and scroll. It makes only a passing mention of auto, which is arguably the value you should almost always use when you want to allow scrolling. And there's no mention at all of clip, which works how hidden always should have worked but didn't. This feels like a major omission.

What did you expect to see?

I would expect guides to be opinionated shortcuts to help novices get up-to-speed more quickly, so I would expect to see helpful hard-won wisdom like:

  • Most of the time, when you want to allow scrolling, you usually want to use the auto value instead of scroll because auto shows the scrollbar track only when it's needed and scroll always shows it, which is almost never what you want.
  • When you want to cut off overflowing content, you probably want the clip value instead of hidden because with clip you have control over the x and y clipping independently, which is not possible with hidden. (Browser support caveats notwithstanding.)

Do you have any supporting links, references, or citations?

Useful explainer on overflow: clip: https://youtu.be/72pUm4tQesw

Do you have anything more you want to share?

No response

MDN metadata

Contributor guide