Re: [csswg-drafts] [css-align] fully specify the "Overflow and Scroll Positions" section

> I think this requires somewhat careful review to see if this definition influences the way scrollTop etc. are reported.

On further review, yeah, our text was somewhat wrong.  In particular, it was setting the origin incorrectly if the content *wasn't* big enough to actually trigger overflow.

All in all, the previous text's attempt to align and then hack scroll coordinates back to being correct was weird and hard to understand.  So we rewrote it again!

This time the text is more straightforwardly stating what's intended: that aligning an overflowing scroll container should show the same content as it would if it weren't scrollable, but that it should allow scrolling to see all the content it should normally be able to show.  We also added a note capturing an important detail: that this *isn't* guaranteed to be identical to just aligning the scroll thumb in the scroll bar (tho it will *often* be identical).

Finally, we realized that doing this alignment (particularly for end-alignment) might be impossible with the current definition of scrollable overflow region, due to end-side padding being excluded in confusing circumstances. So, we defined that the container's end-edge padding is included as needed for end-alignment, and specified that this occurs for all non-normal alignment values for consistency. This also allows us to address the repeated requests for such padding behavior from the web author community without fear of Web-compat issues.

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

Received on Thursday, 9 August 2018 23:34:37 UTC