w3c/IntersectionObserver

Percentage rootMargin resolution is unclear

Closed this issue · 1 comments

Section 2.2 says that percentages in rootMargin are resolved relative to the width of the undilated rectangle - however it seems that percentages on the top and bottom rootMargin values are indeed resolved relative to the height as in this demo where the intersection rectangle ends at 10% of the height of the scroller.

I couldn't find any other section about how percentages are resolved so I initially was expecting even the top/bottom percentages to resolve against the width.

This sounds like a chromium bug, not a spec issue. I filed a chromium bug:

https://bugs.chromium.org/p/chromium/issues/detail?id=1138031