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

[csswg-drafts] [css-nav-1] Remove kAlignWeight? (#4567)

From: Hugo via GitHub <sysbot+gh@w3.org>
Date: Fri, 06 Dec 2019 07:08:03 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-533787829-1575616082-sysbot+gh@w3.org>
hugoholgersson has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-nav-1] Remove kAlignWeight? ==
Today Alignment() always returns a value between 0 and 5. [1]

That's a very small number so Alignment is, in practice, only used to break ties (when two candidates are at the same distance we take the one that is more aligned [2]).

As we only use alignment to break ties, alignment might as well be a number between 0 and 1. This means we can remove the multiplication of `alignWeight` from the formula?

[1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/page/spatial_navigation.cc?q=file:spatial+symbol:Alignment&sq=package:chromium
[2] https://chromium-review.googlesource.com/c/chromium/src/+/1594724/11/third_party/blink/web_tests/fast/spatial-navigation/snav-aligned-insiders.html

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4567 using your GitHub account
Received on Friday, 6 December 2019 07:08:05 UTC

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