WICG / layout-instability

A proposal for a Layout Instability specification
https://wicg.github.io/layout-instability/
Other
159 stars 27 forks source link

Fix ambiguous language in section 2.2, "has not shifted in $X or $Y" #67

Open dholbert opened 4 years ago

dholbert commented 4 years ago

Ambiguous language in section 2.2 here: https://wicg.github.io/layout-instability/#sec-basic-concepts

there does not exist an Element P such that [...conditions...] and:

  1. N has not shifted in the coordinate space of the local coordinate system or scrollable overflow region of P.

This language is currently ambiguous -- it's not clear what the "or" means here.

This could be read to mean two very different things: Interpretation A: "Either: N has not shifted in the coordinate space of the local coordinate system of P, or N has not shifted in the scrollable overflow region of P"

Interpretation B: "N has not shifted in the coordinate space of the local coordinate system of P, nor has it shifted in the scrollable overflow region of P."

Please reword to make it unambiguous.

dholbert commented 4 years ago

Note that this section is particularly tricky to reason about given all of the layers of negation ("N is unstable if: [...] there does not exist an element P such that: [...] N has not shifted in ...")

(Hence the importance of making the language as explicit & unambiguous as possible.)

dholbert commented 4 years ago

Put another way: its not clear to me which of these is what the spec is trying to say:

Interpretation A: "N counts as 'stable' if it stayed fixed in either the local coordinate system of of P or in the scrollable overflow region of P"

...vs: Interpretation B: "N counts as 'stable' if it stayed fixed in both the local coordinate system of P and in the scrollable overflow region of P"

npm1 commented 4 years ago

Assigning to Steve, should be a one-line fix.

clelland commented 2 years ago

Closing, this was addressed in 421c82bfe1c3a3b69a5d9a484a7cc01e160b3a16. Looks like @skobes removed the "local coordinate system" in that commit, and also removed any "OR" clauses from inside that section of the algorithm.