[csswg-drafts] [css-nav-1] Tweak the distance function to prioritize elements that are aligned (#3388)

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

== [css-nav-1] Tweak the distance function to prioritize elements that are aligned ==
---

Migrated from https://github.com/WICG/spatial-navigation/issues/122
Originally created by @frivoal on *Wed, 17 Oct 2018 05:33:36 GMT*

---
The current distance function behaves somewhat strangely, mostly due to:
* measuring edge to edge, which does not help decide which element to go to when two targets are at the same distance from the source's edge, even if one is fully in aligned, and the other is not
* The `B` factor in the formula penalizes elements which are aligned, in a way that is not fully compensated by `C`. Both in combination seem to favor elements at 0 or 90 degrees over those at 45 degrees, which does not seem justified.

We should:
* Switch from measuring from edge to edge to measuring from center to edge
* Drop the B factor, and possibly the C factor as well.

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

Received on Monday, 3 December 2018 07:55:02 UTC