Métriques du dépôt
- Stars
- (8 900 stars)
- Métriques de merge PR
- (Merge moyen 7j 3h) (147 PRs mergées en 30 j)
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
autovalue instead ofscrollbecauseautoshows the scrollbar track only when it's needed andscrollalways shows it, which is almost never what you want. - When you want to cut off overflowing content, you probably want the
clipvalue instead ofhiddenbecause withclipyou have control over the x and y clipping independently, which is not possible withhidden. (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
- Folder:
en-us/learn/css/building_blocks/overflowing_content - MDN URL: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Overflowing_content
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/learn/css/building_blocks/overflowing_content/index.md
- Last commit: https://github.com/mdn/content/commit/afaf3aeeffa8408cf0a8a46c3d8fb0d347aad9f5
- Document last modified: 2024-01-30T05:28:18.000Z