Update mentions of 'scroll container' to refer to scrollable axises when appropriate. #12289#13903
Update mentions of 'scroll container' to refer to scrollable axises when appropriate. #12289#13903tabatkins wants to merge 9 commits into
Conversation
flackr
left a comment
There was a problem hiding this comment.
Overall this looks good, just wanted to get clarification on a couple things.
|
|
||
| The default [=overflow alignment=] behavior | ||
| for [=content distribution=] on [=scroll containers=] is ''unsafe''. | ||
| In a [=scrollable axis=] of a [=scroll container=], |
There was a problem hiding this comment.
What does this mean? I see that overflow-position is only a single value (i.e. single axis) property and other references have been updated to refer to the block axis but this one seems like it cares about both axes? Is the default overflow-position now per axis but can only be specified for both axes? Just trying to confirm what changes we need to make.
There was a problem hiding this comment.
You can do content-distribution in either axis via justify-content and align-content, and specify overflow safety in either axis. The existing spec gives different default behavior based on whether the container is scrollable or not (scrollables default to 'unsafe' because you can just scroll to see the overflow, generally). Now, tho, single-axis scroll containers only want to apply that default in their scrollable axis.
(The other updates are block-only because they're talking about things like baselines.)
| 1. If the element is the [=root element=] and <var>document</var> is in <a>quirks mode</a>, return zero and terminate these steps. | ||
| 1. If the element is the [=root element=] return the value of {{Window/scrollY}} on <var>window</var>. | ||
| 1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a>, and the element is not <a>potentially scrollable</a>, return the value of {{Window/scrollY}} on <var>window</var>. | ||
| 1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a>, and the element is not <a>potentially scrollable</a> in the y axis, return the value of {{Window/scrollY}} on <var>window</var>. |
There was a problem hiding this comment.
This might be fine, but it's very quirky 🥁 that body.scrollTop and body.scrollLeft may refer to different scroll containers in quirks mode. I wonder if this is necessary or if we could just consider whether it is a scroll container in either axis for both.
There was a problem hiding this comment.
I'm fine with either. This is indeed just a quirks mode thing, so probably not important to care about. I'll go ahead and revert it.
There was a problem hiding this comment.
I suppose a followup question is what to do with the setters for scrollTop/Left when the body isn't a scroller in that axis.
There was a problem hiding this comment.
Presumably the same as trying to scroll any non-scrollable element. The setters and methods exist, but don't do any scrolling.
…ntainers in their scrollable axises.
…se it in a few more places.
… scroll chain in their non-scrolling axis.
WIP
Specs which mention scroll container: