Update FindNearestScroller() to take scroll axis into account for single-axis scroll container
Categories
(Core :: CSS Transitions and Animations, defect)
Tracking
()
People
(Reporter: boris, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
Per this spec issue, the spec updates the definition of non-scrollable values and its mapping:
The visible and clip values are known as the non-scrollable values. However, if the other axis specifies a scrollable value, a specified value of visible computes to auto, enabling scrolling in its axis. If neither axis computes to a scrollable value, the box is not a scroll container. If only one axis computes to a scrollable value (i.e. the other axis is clip), the box is a single-axis scroll container.
In other words, it's possible to have a scroller which is scrollable on only one axis. This has impact on scroll animations, e.g.
#scroller {
...
overflowX: scroll;
overflowY: clip;
}
#subject {
animation: ...;
animation-timeline: scroll(nearest block);
}
<div id=scroller>
<div id=subject></div>
</div>
In this case, #scroller is scrollable on the inline axis, but not on the block axis, so the nearest scroller is not #scroller. Instead, it should be the root.
| Reporter | ||
Comment 1•2 months ago
|
||
The wpt:
- scroll-timelines/scroll-timeline-source-single-axis-*.html
- view-timelines/view-timeline-source-single-axis-*.html
| Reporter | ||
Comment 2•2 months ago
|
||
Also, this depends on the update of to_scrollable(), and maybe others related to scroll container frame.
Comment 3•2 months ago
|
||
Linking to the tracking issue for https://github.com/w3c/csswg-drafts/issues/12289 that I filed a while back.
| Reporter | ||
Comment 4•2 months ago
|
||
(In reply to Botond Ballo [:botond] from comment #3)
Linking to the tracking issue for https://github.com/w3c/csswg-drafts/issues/12289 that I filed a while back.
Thanks. That's what we need.
Description
•