W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2019

[csswg-drafts] [css-scroll-anchoring-1] Anchor selection algorithm can lead to random results (#4124)

From: Boris Zbarsky via GitHub <sysbot+gh@w3.org>
Date: Wed, 17 Jul 2019 16:29:06 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-469321488-1563380945-sysbot+gh@w3.org>
bzbarsky has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scroll-anchoring-1] Anchor selection algorithm can lead to random results ==
The way that https://drafts.csswg.org/css-scroll-anchoring/#anchoring-algorithm works is:

1) Walk the child nodes of our scrollable thing.
2) Stop when we find one that meets certain criteria.

The thing is, the algorithm doesn't say what order the child nodes are walked in.  As far as I can tell, you can walk them forwards, backwards, or in any random order, and those would all be spec-compliant.

Note that just walking in DOM order from start to end may not be the right thing either; e.g. if the parent is a grid the earlier DOM kids may not be the thing you want to anchor at because they are further from the block start edge than later kids are.

@emilio @skobes

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4124 using your GitHub account
Received on Wednesday, 17 July 2019 16:29:08 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:50 UTC