-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Add scrollIntoView() container option #40588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I don't know if there should be more details to the option description |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Preview URLs (comment last updated: 2025-08-05 08:26:02) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Howdy. The documentation you added for the container
option is great, but can you say why you added quotes around all the option values? And why you didn’t also add any quotes around the option names?
Are you maybe following the example of a how some similar content on another existing page is formatted?
I’d personally prefer that we not put quotes around any of them. And I’m not sure if the MDN style guide provides any guidance on this. But at least I don’t think we have any linter that actually enforces that style.
But maybe this style (putting quotes around the option values but not the option names) is how most MDN pages are styled.
If so, I guess maybe the logic for that would be, the option values are strings but the option names aren’t? Regardless, from just that, I don’t personally think it follows that it should be necessary or useful to quote the option values — especially not in a case like this page, where all the options are limited to an enumerated set of values, and can’t be any arbitrary string.
I don't think there should be quotes either, @Josh-Cena I will remove them (but keep the reordering you made) |
We indeed don't have written guidelines, but I'm saying "yes" in https://github.com/orgs/mdn/discussions/779. You are welcome to give opinions for "no". |
I guess it should be a separate PR that updates all string values, for now other pages seems to be unquoted (e.g. https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo, https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#open...) |
Alright, okay to keep it in this form |
@aguingand, 👍 and congrats on landing your first docs change here — welcome aboard 🎉 |
@sideshowbarker Thank you ! Long live MDN ! |
@sideshowbarker I think BCD PR should be merged too (mdn/browser-compat-data#27463) |
Description
Documentation of the new
Element.scrollintoView()
container
option.Motivation
The
container
option has been specified & scheduled to ship in Chrome 140.Additional details
https://drafts.csswg.org/cssom-view/#dom-scrollintoviewoptions-container
https://cr-status.appspot.com/feature/5100036528275456?gate=5140738792488960
Related issues
mdn/browser-compat-data#27463