Re: [csswg-drafts] [css-align-3] What is supposed to happen to abspos in an end-aligned scroll container? (#4957)

I think some of the question here is about what the underlying model is.  There was some prior discussion about this in #1425.

It seems like there are two ways to describe the behavior that the spec describes:
1. the `align-content` layout happens as normal, but the scrollbar allows scrolling in the reverse direction from normal.  This probably implies that, for the initial scroll position, `scrollTop` or `scrollLeft` (as relevant) is `0`.  I think this model would apply that absolute positioning `top: 0` or `left: 0` position would be visible at the initial layout position.
2. For elements with `overflow`, `align-content: end` doesn't have its normal effect, but instead, causes the initial scroll position to be at the end rather than the start.  This probably implies that for the initial scroll position, `scrollTop` or `scrollLeft` (as relevant) is non-zero.  I think this model would apply that absolute positioning `top: 0` or `left: 0` position would not be visible at the initial layout position, but would instead be visible only when the user (or developer) scrolls all the way to the top or left, which is not the initial position.

The spec's current text seems to take the second choice.

I think for the sake of developers who work with this a lot being able to build a reasonable mental model of what's happening, I think it's better to choose the entire model together.  So I think the question of what we think should happen for absolute positioning (this issue), the question of what we think `scrollTop` and `scrollLeft` should do, and perhaps other questions, should be used to choose which *model* the spec should use to describe this, and then the answers to those questions should result from the choice of model.

-- 
GitHub Notification of comment by dbaron
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4957#issuecomment-627004071 using your GitHub account

Received on Monday, 11 May 2020 22:41:46 UTC