[csswg-drafts] [css-scroll-anchoring-1] Explicit anchoring (#4264)

SebastianZ has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scroll-anchoring-1] Explicit anchoring ==
The Scroll Anchoring module already allows to opt-out elements of the scroll anchoring algorithm via [`overflow-anchor: none;`](https://drafts.csswg.org/css-scroll-anchoring/#propdef-overflow-anchor). And `auto` makes an element potentially eligible for anchoring. Though there is currently no way to enforce anchoring to an element.

The idea behind this is to allow the author to tell the user agent explicitly that it should prefer specific elements when running the anchor node selection algorithm. A use case for this are several content pieces, of which one is the main content.

To make this possible, there should be a new value like `prefer` for the `overflow-anchor` property.

Elements having this value set should be checked first by influencing the order in which the elements are checked in step 2 of the [anchoring node selection algorithm](https://drafts.csswg.org/css-scroll-anchoring/#anchoring-algorithm).
It _might_ also influence the candidate examination algorithm by preferring those elements over fully visible elements even when they are just partially visible.

Sebastian

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4264 using your GitHub account

Received on Sunday, 1 September 2019 21:43:08 UTC