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

I might be late to the discussion here, but I am a little puzzled by this behaviour.

**Model 1 – Shifting the coordinate system**

Model one implies that the coordinate system of the scrollable overflow area is shifted so that parts of the scrollable overflow area must be addressed with negative coordinates. Using this model an abspos element with `top: 0; left 0;` would be visible in the initial scroll port, but not without side effects for authors.

How would it be possible to position abspos elements so that they cover the entire overflow area?  `top: 0; left: 0; right: 0; bottom: 0;` would only cover the positive parts of the coordinate system (the initial scroll port). 

How is size of abspos elements affected? that is what would  `top: 0; left: 0; height: 100%;` do?

How would it be possible to position abspos elements relative to the top/start with css only without taking content distribution into account? Changing content distribution would change the entire coordinate system, requiring new calculations for positioning abspos elements.

**Model 2 – Scrolling to match content distribution**
This model scrolls the scroll port so that initially visible content of the scroll container matches the expected alignment. The coordinate system is not shifted, and positioning works as expected relative to the scrollable overflow area. 

This implies a hidden functionality to control the initial scroll position of a scroll container. I can see authors using content distribution to get to this functionality, much as we used `overflow: hidden` to start a new block formatting context.

Maybe this functionality could be exposed? `initial-scroll: start | center | end`. That way it would also be possible to override the scrolling if that was not intended.

**Model 3 – no scrolling**
There is also a third model here, that is worth discussing; avoiding magical scrolling. 

We're aligning the content of the scrollable overflow area. I would be puzzled if I used the short hand `place-content: end;`  to justify items and ended up with a scrolled container. 

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 18 February 2021 07:50:38 UTC