Skip to content

[css-position] Is the "nearest scrollport" in DOM hierarchy or in containing block hierarchy? #7483

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

Closed
wangxianzhu opened this issue Jul 10, 2022 · 5 comments

Comments

@wangxianzhu
Copy link

https://drafts.csswg.org/css-overflow-3/#nearest-scrollport says:
For convenience, a box’s nearest scrollport is the scrollport of its nearest scroll container ancestor.

It doesn't say the "ancestor" is in DOM hierarchy or in containing block hierarchy.

For the following case:

<div id="outer-scroller" style="overflow: scroll; position: relative">
  <div id="inner-scroller" style="overflow: scroll">
    <div style="position: absolute">
      <div style="position: sticky">

Is the nearest scrollport of the stickily positioned element "inner-scroller" or "outer-scroller"?

"outer-scroller" looks to make more sense to me, but I think the spec needs clarification.

@Loirooriol
Copy link
Contributor

This is basically #3185

@wangxianzhu
Copy link
Author

Closing because this is a duplicate of #3185.

@thecalamiity
Copy link

@wangxianzhu Well you forgot to actually close 😅

@wangxianzhu
Copy link
Author

Thanks for the heads-up!

@tabatkins
Copy link
Member

You still didn't close it, but I got you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants